Merge pull request #88 from travis-ci/jk_remove_workers_endpoints
Remove old workers endpoints
This commit is contained in:
commit
419fe6fdf9
|
@ -1,15 +0,0 @@
|
||||||
require 'travis/api/app'
|
|
||||||
|
|
||||||
class Travis::Api::App
|
|
||||||
class Endpoint
|
|
||||||
class Workers < Endpoint
|
|
||||||
get '/' do
|
|
||||||
respond_with service(:find_workers, params), type: :workers
|
|
||||||
end
|
|
||||||
|
|
||||||
get '/:id' do
|
|
||||||
respond_with service(:find_worker, params), type: :worker
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,12 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'Workers' do
|
|
||||||
let!(:workers) { [Worker.create(full_name: 'one'), Worker.create(full_name: 'two')] }
|
|
||||||
let(:headers) { { 'HTTP_ACCEPT' => 'application/vnd.travis-ci.1+json' } }
|
|
||||||
|
|
||||||
it 'GET /workers' do
|
|
||||||
response = get '/workers', {}, headers
|
|
||||||
response.should deliver_json_for(Worker.all, version: 'v1', type: 'workers')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'Workers' do
|
|
||||||
let!(:workers) { [Worker.create(full_name: 'one'), Worker.create(full_name: 'two')] }
|
|
||||||
let(:headers) { { 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json' } }
|
|
||||||
|
|
||||||
it 'GET /workers' do
|
|
||||||
response = get '/workers', {}, headers
|
|
||||||
response.should deliver_json_for(Worker.all, version: 'v2', type: 'workers')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe Travis::Api::App::Endpoint::Workers do
|
|
||||||
it 'has to be tested'
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user