Compare commits

..

No commits in common. "fix-5457-tests" and "master" have entirely different histories.

2 changed files with 1 additions and 13 deletions

View File

@ -11,7 +11,6 @@ class Travis::Api::App
get '/' do
prefer_follower do
params['ids'] = params['ids'].split(',') if params['ids'].respond_to?(:split)
respond_with service(:find_jobs, params)
end
end

View File

@ -11,22 +11,11 @@ describe 'Jobs', set_app: true do
response.should deliver_json_for(Job.queued('builds.common'), version: 'v2')
end
it 'GET /jobs/:id' do
it '/jobs/:id' do
response = get "/jobs/#{job.id}", {}, headers
response.should deliver_json_for(job, version: 'v2')
end
it 'GET /jobs?ids=1' do
response = get "/jobs?ids=#{job.id}", {}, headers
response.should deliver_json_for(Travis::Api::App::Jobs.new([job]), version: 'v2')
end
it 'GET /jobs?ids=1,2' do
ids = jobs.map(&:id).sort.join(',')
response = get "/jobs?ids=#{ids}", {}, headers
response.should deliver_json_for(Travis::Api::App::Jobs.new(jobs.sort { |a,b| a.id <=> b.id }), version: 'v2')
end
context 'GET /jobs/:job_id/log.txt' do
it 'returns log for a job' do
job.log.update_attributes!(content: 'the log')