Fix commit status POST URL
This commit is contained in:
parent
914cfbd2f1
commit
887494761e
2 changed files with 4 additions and 4 deletions
|
@ -41,7 +41,7 @@ module API
|
||||||
# description (optional) - A short description of the status
|
# description (optional) - A short description of the status
|
||||||
# name or context (optional) - A string label to differentiate this status from the status of other systems. Default: "default"
|
# name or context (optional) - A string label to differentiate this status from the status of other systems. Default: "default"
|
||||||
# Examples:
|
# Examples:
|
||||||
# POST /projects/:id/repository/commits/:sha/status
|
# POST /projects/:id/statuses/:sha
|
||||||
post ':id/statuses/:sha' do
|
post ':id/statuses/:sha' do
|
||||||
required_attributes! [:state]
|
required_attributes! [:state]
|
||||||
attrs = attributes_for_keys [:ref, :target_url, :description, :context, :name]
|
attrs = attributes_for_keys [:ref, :target_url, :description, :context, :name]
|
||||||
|
|
|
@ -72,8 +72,8 @@ describe API::API, api: true do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'POST /projects/:id/repository/commits/:sha/status' do
|
describe 'POST /projects/:id/statuses/:sha' do
|
||||||
let(:post_url) { "/projects/#{project.id}/repository/commits/#{commit.id}/status" }
|
let(:post_url) { "/projects/#{project.id}/statuses/#{commit.id}" }
|
||||||
|
|
||||||
context 'reporter user' do
|
context 'reporter user' do
|
||||||
context 'should create commit status' do
|
context 'should create commit status' do
|
||||||
|
@ -112,7 +112,7 @@ describe API::API, api: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'invalid commit' do
|
it 'invalid commit' do
|
||||||
post api("/projects/#{project.id}/repository/commits/invalid_sha/status", user), state: 'running'
|
post api("/projects/#{project.id}/statuses/invalid_sha", user), state: 'running'
|
||||||
expect(response.status).to eq(404)
|
expect(response.status).to eq(404)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue