summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2016-12-23 12:23:04 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-03 10:52:14 -0600
commit68c730bb99a12b0ea8ac3d08f074dc66e7ac2dae (patch)
treed2d55167efd490860767887afec1f6060e2ccf51 /spec/controllers
parent4cd139e948ad0de3516b6534146b51faffeca610 (diff)
downloadgitlab-ce-68c730bb99a12b0ea8ac3d08f074dc66e7ac2dae.tar.gz
Fixed rspec tests for the project members also fixed the index
view (removed an extra tag )
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/project_members_controller_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb
index b52137fbe7e..6fa7bbd6dae 100644
--- a/spec/controllers/projects/project_members_controller_spec.rb
+++ b/spec/controllers/projects/project_members_controller_spec.rb
@@ -5,11 +5,11 @@ describe Projects::ProjectMembersController do
let(:project) { create(:empty_project, :public, :access_requestable) }
describe 'GET index' do
- it 'renders index with 200 status code' do
+ it 'redirects to settings/members with 302 status code' do
get :index, namespace_id: project.namespace, project_id: project
- expect(response).to have_http_status(200)
- expect(response).to render_template(:index)
+ expect(response).to have_http_status(302)
+ expect(response).to redirect_to(namespace_project_settings_members_path(project.namespace, project))
end
end
@@ -44,7 +44,7 @@ describe Projects::ProjectMembersController do
access_level: Gitlab::Access::GUEST
expect(response).to set_flash.to 'Users were successfully added.'
- expect(response).to redirect_to(namespace_project_project_members_path(project.namespace, project))
+ expect(response).to redirect_to(namespace_project_settings_members_path(project.namespace, project))
end
it 'adds no user to members' do
@@ -56,7 +56,7 @@ describe Projects::ProjectMembersController do
access_level: Gitlab::Access::GUEST
expect(response).to set_flash.to 'No users or groups specified.'
- expect(response).to redirect_to(namespace_project_project_members_path(project.namespace, project))
+ expect(response).to redirect_to(namespace_project_settings_members_path(project.namespace, project))
end
end
end
@@ -99,7 +99,7 @@ describe Projects::ProjectMembersController do
id: member
expect(response).to redirect_to(
- namespace_project_project_members_path(project.namespace, project)
+ namespace_project_settings_members_path(project.namespace, project)
)
expect(project.members).not_to include member
end
@@ -259,7 +259,7 @@ describe Projects::ProjectMembersController do
expect(project.team_members).to include member
expect(response).to set_flash.to 'Successfully imported'
expect(response).to redirect_to(
- namespace_project_project_members_path(project.namespace, project)
+ namespace_project_settings_members_path(project.namespace, project)
)
end
end