pass the repository github_id, too (required in pro)
This commit is contained in:
parent
67e1cf384a
commit
acefb6a53b
|
@ -34,7 +34,9 @@ class Travis::Api::App
|
||||||
end
|
end
|
||||||
|
|
||||||
def payload
|
def payload
|
||||||
MultiJson.encode(params.merge(user: { id: current_user.id }))
|
data = params.merge(user: { id: current_user.id })
|
||||||
|
data[:repository][:id] = repo.github_id
|
||||||
|
MultiJson.encode(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def repo
|
def repo
|
||||||
|
|
|
@ -45,8 +45,9 @@ describe Travis::Api::App::Endpoint::Requests do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'schedules the build request' do
|
it 'schedules the build request' do
|
||||||
payload = MultiJson.encode(data[:request].merge(user: { id: user.id }))
|
payload = data[:request].merge(user: { id: user.id })
|
||||||
Travis::Sidekiq::BuildRequest.expects(:perform_async).with(type: 'api', payload: payload, credentials: {})
|
payload[:repository][:id] = repo.github_id
|
||||||
|
Travis::Sidekiq::BuildRequest.expects(:perform_async).with(type: 'api', payload: MultiJson.encode(payload), credentials: {})
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user