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-01-27 15:08:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 15:08:35 +0300
commit22e9af3c8b8aedf7f46b786be968862b74a2d07e (patch)
treea10a7d9af40a17fe6cda7b3a681f5e5e2112c16e /spec/controllers/groups_controller_spec.rb
parentc8e28a0bb8dd45d91cb72ff2c930bc4a562f1fc7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/groups_controller_spec.rb')
-rw-r--r--spec/controllers/groups_controller_spec.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index 2ed2b319298..3399ad563a1 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -136,7 +136,7 @@ describe GroupsController do
get :activity, params: { id: group.to_param }, format: :json
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['count']).to eq(3)
expect(assigns(:projects).limit_value).to be_nil
end
@@ -151,7 +151,7 @@ describe GroupsController do
post :create, params: { group: { name: 'new_group', path: "new_group" } }
end.to change { Group.count }.by(1)
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
context 'authorization' do
@@ -162,7 +162,7 @@ describe GroupsController do
post :create, params: { group: { name: 'new_group', path: "new_group" } }
end.to change { Group.count }.by(1)
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
end
@@ -367,7 +367,7 @@ describe GroupsController do
it 'updates the path successfully' do
post :update, params: { id: group.to_param, group: { path: 'new_path' } }
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(controller).to set_flash[:notice]
end
@@ -382,7 +382,7 @@ describe GroupsController do
it 'updates the project_creation_level successfully' do
post :update, params: { id: group.to_param, group: { project_creation_level: ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS } }
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(group.reload.project_creation_level).to eq(::Gitlab::Access::MAINTAINER_PROJECT_ACCESS)
end
@@ -397,7 +397,7 @@ describe GroupsController do
post :update, params: { id: group.to_param, group: { name: 'new_name' } }
expect(controller).to set_flash[:notice]
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(group.reload.name).to eq('new_name')
end
@@ -405,7 +405,7 @@ describe GroupsController do
post :update, params: { id: group.to_param, group: { path: 'new_path' } }
expect(assigns(:group).errors[:base].first).to match(/Docker images in their Container Registry/)
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
end
@@ -468,7 +468,7 @@ describe GroupsController do
it 'does not redirect' do
get :issues, params: { id: group.to_param }
- expect(response).not_to have_gitlab_http_status(301)
+ expect(response).not_to have_gitlab_http_status(:moved_permanently)
end
end
@@ -487,7 +487,7 @@ describe GroupsController do
it 'does not redirect' do
get :show, params: { id: group.to_param }
- expect(response).not_to have_gitlab_http_status(301)
+ expect(response).not_to have_gitlab_http_status(:moved_permanently)
end
end
@@ -554,13 +554,13 @@ describe GroupsController do
it 'does not 404' do
post :update, params: { id: group.to_param.upcase, group: { path: 'new_path' } }
- expect(response).not_to have_gitlab_http_status(404)
+ expect(response).not_to have_gitlab_http_status(:not_found)
end
it 'does not redirect to the correct casing' do
post :update, params: { id: group.to_param.upcase, group: { path: 'new_path' } }
- expect(response).not_to have_gitlab_http_status(301)
+ expect(response).not_to have_gitlab_http_status(:moved_permanently)
end
end
@@ -570,7 +570,7 @@ describe GroupsController do
it 'returns not found' do
post :update, params: { id: redirect_route.path, group: { path: 'new_path' } }
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -580,13 +580,13 @@ describe GroupsController do
it 'does not 404' do
delete :destroy, params: { id: group.to_param.upcase }
- expect(response).not_to have_gitlab_http_status(404)
+ expect(response).not_to have_gitlab_http_status(:not_found)
end
it 'does not redirect to the correct casing' do
delete :destroy, params: { id: group.to_param.upcase }
- expect(response).not_to have_gitlab_http_status(301)
+ expect(response).not_to have_gitlab_http_status(:moved_permanently)
end
end
@@ -596,7 +596,7 @@ describe GroupsController do
it 'returns not found' do
delete :destroy, params: { id: redirect_route.path }
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -693,7 +693,7 @@ describe GroupsController do
end
it 'is denied' do
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -755,13 +755,13 @@ describe GroupsController do
it 'is successful' do
get :show, params: { id: group.to_param }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'does not allow other formats' do
get :show, params: { id: group.to_param }, format: :atom
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -769,7 +769,7 @@ describe GroupsController do
it 'is successful' do
get :edit, params: { id: group.to_param }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
@@ -777,7 +777,7 @@ describe GroupsController do
it 'is successful' do
get :new
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
@@ -786,7 +786,7 @@ describe GroupsController do
get :index
# Redirects to the dashboard
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
end
@@ -810,7 +810,7 @@ describe GroupsController do
it 'deletes the group' do
delete :destroy, params: { id: group.to_param }
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
end
end