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
|
||||
|
||||
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
|
||||
|
||||
def repo
|
||||
|
|
|
@ -45,8 +45,9 @@ describe Travis::Api::App::Endpoint::Requests do
|
|||
end
|
||||
|
||||
it 'schedules the build request' do
|
||||
payload = MultiJson.encode(data[:request].merge(user: { id: user.id }))
|
||||
Travis::Sidekiq::BuildRequest.expects(:perform_async).with(type: 'api', payload: payload, credentials: {})
|
||||
payload = data[:request].merge(user: { id: user.id })
|
||||
payload[:repository][:id] = repo.github_id
|
||||
Travis::Sidekiq::BuildRequest.expects(:perform_async).with(type: 'api', payload: MultiJson.encode(payload), credentials: {})
|
||||
response
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user