summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 12:15:35 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 12:15:35 +0200
commit887494761ee41e8e647753e597fab534ed738058 (patch)
tree7861f2d6d59ac85c5669841b4d26e5ac788fdace
parent914cfbd2f154ed3154a7dc3cee3309713eea786f (diff)
downloadgitlab-ce-887494761ee41e8e647753e597fab534ed738058.tar.gz
Fix commit status POST URL
-rw-r--r--lib/api/commit_statuses.rb2
-rw-r--r--spec/requests/api/commit_status_spec.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index cfe8739b175..41c05334296 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -41,7 +41,7 @@ module API
# 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"
# Examples:
- # POST /projects/:id/repository/commits/:sha/status
+ # POST /projects/:id/statuses/:sha
post ':id/statuses/:sha' do
required_attributes! [:state]
attrs = attributes_for_keys [:ref, :target_url, :description, :context, :name]
diff --git a/spec/requests/api/commit_status_spec.rb b/spec/requests/api/commit_status_spec.rb
index d1dc97e1846..b9e6dfc15a7 100644
--- a/spec/requests/api/commit_status_spec.rb
+++ b/spec/requests/api/commit_status_spec.rb
@@ -72,8 +72,8 @@ describe API::API, api: true do
end
end
- describe 'POST /projects/:id/repository/commits/:sha/status' do
- let(:post_url) { "/projects/#{project.id}/repository/commits/#{commit.id}/status" }
+ describe 'POST /projects/:id/statuses/:sha' do
+ let(:post_url) { "/projects/#{project.id}/statuses/#{commit.id}" }
context 'reporter user' do
context 'should create commit status' do
@@ -112,7 +112,7 @@ describe API::API, api: true do
end
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)
end
end