Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
commitabae8f34f377519946a91101ef7abf504454531c (patch)
tree359fab0082860b6850d4a0a492b8f12eb3d4eb0b /spec/support/shared_examples
parent580622bdb3c762a8e89facd8a3946881ee480442 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r--spec/support/shared_examples/controllers/sessionless_auth_controller_shared_examples.rb4
-rw-r--r--spec/support/shared_examples/controllers/update_invalid_issuable_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb4
-rw-r--r--spec/support/shared_examples/requests/api/milestones_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/requests/api/notes_shared_examples.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/shared_examples/controllers/sessionless_auth_controller_shared_examples.rb b/spec/support/shared_examples/controllers/sessionless_auth_controller_shared_examples.rb
index e21a3b2f588..f2a97a86df6 100644
--- a/spec/support/shared_examples/controllers/sessionless_auth_controller_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/sessionless_auth_controller_shared_examples.rb
@@ -86,7 +86,7 @@ RSpec.shared_examples 'authenticates sessionless user' do |path, format, params|
get path, params: default_params.merge(feed_token: 'token')
- expect(response.status).not_to eq 200
+ expect(response).not_to have_gitlab_http_status(:ok)
end
end
@@ -103,6 +103,6 @@ RSpec.shared_examples 'authenticates sessionless user' do |path, format, params|
get path, params: default_params.merge(private_token: 'token')
- expect(response.status).not_to eq(200)
+ expect(response).not_to have_gitlab_http_status(:ok)
end
end
diff --git a/spec/support/shared_examples/controllers/update_invalid_issuable_shared_examples.rb b/spec/support/shared_examples/controllers/update_invalid_issuable_shared_examples.rb
index 224cf45ebb3..4a0d5b755db 100644
--- a/spec/support/shared_examples/controllers/update_invalid_issuable_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/update_invalid_issuable_shared_examples.rb
@@ -39,7 +39,7 @@ RSpec.shared_examples 'update invalid issuable' do |klass|
put :update, params: params
- expect(response.status).to eq(409)
+ expect(response).to have_gitlab_http_status(:conflict)
expect(json_response).to have_key('errors')
end
end
diff --git a/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb b/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb
index 662c64647d6..a20c1d78912 100644
--- a/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb
@@ -13,7 +13,7 @@ RSpec.shared_examples 'handle uploads' do
context 'when a user is not authorized to upload a file' do
it 'returns 404 status' do
post :create, params: params.merge(file: jpg), format: :json
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -319,7 +319,7 @@ RSpec.shared_examples 'handle uploads authorize' do
it 'returns 404 status' do
post_authorize
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
diff --git a/spec/support/shared_examples/requests/api/milestones_shared_examples.rb b/spec/support/shared_examples/requests/api/milestones_shared_examples.rb
index b7cc5f2ca6b..3afb26bc869 100644
--- a/spec/support/shared_examples/requests/api/milestones_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/milestones_shared_examples.rb
@@ -66,7 +66,7 @@ RSpec.shared_examples 'group and project milestones' do |route_definition|
it 'returns a milestone by iids array' do
get api("#{route}?iids=#{closed_milestone.iid}", user)
- expect(response.status).to eq 200
+ expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers
expect(json_response.size).to eq(1)
expect(json_response.size).to eq(1)
diff --git a/spec/support/shared_examples/requests/api/notes_shared_examples.rb b/spec/support/shared_examples/requests/api/notes_shared_examples.rb
index 72e8b920192..61ac9acb154 100644
--- a/spec/support/shared_examples/requests/api/notes_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/notes_shared_examples.rb
@@ -25,7 +25,7 @@ RSpec.shared_examples 'noteable API' do |parent_type, noteable_type, id_name|
get api("/#{parent_type}/#{parent_id}/#{noteable_type}/#{noteable[id_name]}/notes", user)
- expect(response.status).to eq(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
context '2 notes with equal created_at' do