Compare commits
No commits in common. "fix-5457-tests" and "master" have entirely different histories.
fix-5457-t
...
master
|
@ -11,7 +11,6 @@ class Travis::Api::App
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
prefer_follower do
|
prefer_follower do
|
||||||
params['ids'] = params['ids'].split(',') if params['ids'].respond_to?(:split)
|
|
||||||
respond_with service(:find_jobs, params)
|
respond_with service(:find_jobs, params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,22 +11,11 @@ describe 'Jobs', set_app: true do
|
||||||
response.should deliver_json_for(Job.queued('builds.common'), version: 'v2')
|
response.should deliver_json_for(Job.queued('builds.common'), version: 'v2')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'GET /jobs/:id' do
|
it '/jobs/:id' do
|
||||||
response = get "/jobs/#{job.id}", {}, headers
|
response = get "/jobs/#{job.id}", {}, headers
|
||||||
response.should deliver_json_for(job, version: 'v2')
|
response.should deliver_json_for(job, version: 'v2')
|
||||||
end
|
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
|
context 'GET /jobs/:job_id/log.txt' do
|
||||||
it 'returns log for a job' do
|
it 'returns log for a job' do
|
||||||
job.log.update_attributes!(content: 'the log')
|
job.log.update_attributes!(content: 'the log')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user