diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-01 19:07:23 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-14 14:07:26 +0300 |
commit | d71fbe0dbdb3b7aba6f71e6d3d50daaa890769e9 (patch) | |
tree | 9e0c6fa7768bb5899ddf9e25d009347e462fda9d /spec/controllers | |
parent | d26f81239a33b80694783ee35f0da0e2ed082c9b (diff) |
Factorize #request_access and #approve_access_request into a new AccessRequestActions controller concern
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups/group_members_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/projects/project_members_controller_spec.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb index aea809f890b..0ca8a656f63 100644 --- a/spec/controllers/groups/group_members_controller_spec.rb +++ b/spec/controllers/groups/group_members_controller_spec.rb @@ -165,7 +165,7 @@ describe Groups::GroupMembersController do context 'when member is not found' do it 'returns 403' do - post :approve, group_id: group, + post :approve_access_request, group_id: group, id: 42 expect(response.status).to eq(403) @@ -187,7 +187,7 @@ describe Groups::GroupMembersController do end it 'returns 403' do - post :approve, group_id: group, + post :approve_access_request, group_id: group, id: member expect(response.status).to eq(403) @@ -202,7 +202,7 @@ describe Groups::GroupMembersController do end it 'adds user to members' do - post :approve, group_id: group, + post :approve_access_request, group_id: group, id: member expect(response).to redirect_to(group_group_members_path(group)) diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb index 2ea09f43f26..d3bd2d0bbba 100644 --- a/spec/controllers/projects/project_members_controller_spec.rb +++ b/spec/controllers/projects/project_members_controller_spec.rb @@ -224,7 +224,7 @@ describe Projects::ProjectMembersController do context 'when member is not found' do it 'returns 404' do - post :approve, namespace_id: project.namespace, + post :approve_access_request, namespace_id: project.namespace, project_id: project, id: 42 @@ -247,7 +247,7 @@ describe Projects::ProjectMembersController do end it 'returns 404' do - post :approve, namespace_id: project.namespace, + post :approve_access_request, namespace_id: project.namespace, project_id: project, id: member @@ -263,7 +263,7 @@ describe Projects::ProjectMembersController do end it 'adds user to members' do - post :approve, namespace_id: project.namespace, + post :approve_access_request, namespace_id: project.namespace, project_id: project, id: member |