Another attempt at serialization

This commit is contained in:
Georges Dupéron 2016-08-24 16:31:30 +02:00
parent af19859e29
commit 5e80535de7

View File

@ -18,13 +18,13 @@ describe 'Jobs', set_app: true do
it 'GET /jobs?ids=1' do
response = get "/jobs?ids=#{job.id}", {}, headers
response.should deliver_json_for(Travis::Api::App::Endoint::Jobs.new([job]), version: 'v2')
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(Jobs.new(jobs.sort { |a,b| a.id <=> b.id }), version: 'v2')
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