diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
commit | f7bdfe5098c9a5a3a426344ba1d7dd668212cf7e (patch) | |
tree | 5a1cb2a90b0a2b5114f6f23712b68724b3e8a7e0 /spec/requests/api/v3/labels_spec.rb | |
parent | 9cd528aa7ac5066570cb50b909951a6c6b723935 (diff) | |
parent | e16add2267648d3d3ef1d98f9b53f67a29428791 (diff) | |
download | gitlab-ce-es-module-autosave.tar.gz |
Merge branch 'master' into 'es-module-autosave'es-module-autosave
# Conflicts:
# app/assets/javascripts/issuable_form.js
# app/assets/javascripts/notes.js
Diffstat (limited to 'spec/requests/api/v3/labels_spec.rb')
-rw-r--r-- | spec/requests/api/v3/labels_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/requests/api/v3/labels_spec.rb b/spec/requests/api/v3/labels_spec.rb index 32f37a08024..1d31213d5ca 100644 --- a/spec/requests/api/v3/labels_spec.rb +++ b/spec/requests/api/v3/labels_spec.rb @@ -27,7 +27,7 @@ describe API::V3::Labels do get v3_api("/projects/#{project.id}/labels", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response).to be_an Array expect(json_response.size).to eq(3) expect(json_response.first.keys).to match_array expected_keys @@ -71,7 +71,7 @@ describe API::V3::Labels do it "subscribes to the label" do post v3_api("/projects/#{project.id}/labels/#{label1.title}/subscription", user) - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(201) expect(json_response["name"]).to eq(label1.title) expect(json_response["subscribed"]).to be_truthy end @@ -81,7 +81,7 @@ describe API::V3::Labels do it "subscribes to the label" do post v3_api("/projects/#{project.id}/labels/#{label1.id}/subscription", user) - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(201) expect(json_response["name"]).to eq(label1.title) expect(json_response["subscribed"]).to be_truthy end @@ -93,7 +93,7 @@ describe API::V3::Labels do it "returns 304" do post v3_api("/projects/#{project.id}/labels/#{label1.id}/subscription", user) - expect(response).to have_http_status(304) + expect(response).to have_gitlab_http_status(304) end end @@ -101,7 +101,7 @@ describe API::V3::Labels do it "returns 404 error" do post v3_api("/projects/#{project.id}/labels/1234/subscription", user) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end end @@ -113,7 +113,7 @@ describe API::V3::Labels do it "unsubscribes from the label" do delete v3_api("/projects/#{project.id}/labels/#{label1.title}/subscription", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response["name"]).to eq(label1.title) expect(json_response["subscribed"]).to be_falsey end @@ -123,7 +123,7 @@ describe API::V3::Labels do it "unsubscribes from the label" do delete v3_api("/projects/#{project.id}/labels/#{label1.id}/subscription", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response["name"]).to eq(label1.title) expect(json_response["subscribed"]).to be_falsey end @@ -135,7 +135,7 @@ describe API::V3::Labels do it "returns 304" do delete v3_api("/projects/#{project.id}/labels/#{label1.id}/subscription", user) - expect(response).to have_http_status(304) + expect(response).to have_gitlab_http_status(304) end end @@ -143,7 +143,7 @@ describe API::V3::Labels do it "returns 404 error" do delete v3_api("/projects/#{project.id}/labels/1234/subscription", user) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end end @@ -152,18 +152,18 @@ describe API::V3::Labels do it 'returns 200 for existing label' do delete v3_api("/projects/#{project.id}/labels", user), name: 'label1' - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it 'returns 404 for non existing label' do delete v3_api("/projects/#{project.id}/labels", user), name: 'label2' - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) expect(json_response['message']).to eq('404 Label Not Found') end it 'returns 400 for wrong parameters' do delete v3_api("/projects/#{project.id}/labels", user) - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end end end |