From 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 26 Feb 2020 15:08:56 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/requests/api/markdown_spec.rb | 14 +- spec/requests/api/members_spec.rb | 60 +++--- spec/requests/api/merge_request_diffs_spec.rb | 10 +- spec/requests/api/merge_requests_spec.rb | 266 ++++++++++++------------ spec/requests/api/namespaces_spec.rb | 22 +- spec/requests/api/notes_spec.rb | 18 +- spec/requests/api/notification_settings_spec.rb | 16 +- spec/requests/api/oauth_tokens_spec.rb | 6 +- spec/requests/api/runner_spec.rb | 15 ++ 9 files changed, 221 insertions(+), 206 deletions(-) (limited to 'spec/requests/api') diff --git a/spec/requests/api/markdown_spec.rb b/spec/requests/api/markdown_spec.rb index 8a1e1b05c9a..9b787e76740 100644 --- a/spec/requests/api/markdown_spec.rb +++ b/spec/requests/api/markdown_spec.rb @@ -16,7 +16,7 @@ describe API::Markdown do shared_examples "rendered markdown text without GFM" do it "renders markdown text" do - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(:created) expect(response.headers["Content-Type"]).to eq("application/json") expect(json_response).to be_a(Hash) expect(json_response["html"]).to eq("

#{text}

") @@ -25,7 +25,7 @@ describe API::Markdown do shared_examples "404 Project Not Found" do it "responses with 404 Not Found" do - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) expect(response.headers["Content-Type"]).to eq("application/json") expect(json_response).to be_a(Hash) expect(json_response["message"]).to eq("404 Project Not Found") @@ -37,7 +37,7 @@ describe API::Markdown do let(:params) { {} } it "responses with 400 Bad Request" do - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(:bad_request) expect(response.headers["Content-Type"]).to eq("application/json") expect(json_response).to be_a(Hash) expect(json_response["error"]).to eq("text is missing") @@ -83,7 +83,7 @@ describe API::Markdown do let(:params) { { text: text, gfm: true } } it "renders markdown text" do - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(:created) expect(response.headers["Content-Type"]).to eq("application/json") expect(json_response).to be_a(Hash) expect(json_response["html"]).to include("Hello world!") @@ -100,7 +100,7 @@ describe API::Markdown do let(:user) { project.owner } it "renders markdown text" do - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(:created) expect(response.headers["Content-Type"]).to eq("application/json") expect(json_response).to be_a(Hash) expect(json_response["html"]).to include("Hello world!") @@ -120,7 +120,7 @@ describe API::Markdown do shared_examples 'user without proper access' do it 'does not render the title or link' do - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(:created) expect(json_response["html"]).not_to include('Confidential title') expect(json_response["html"]).not_to include('