diff options
Diffstat (limited to 'spec/controllers/groups/group_members_controller_spec.rb')
-rw-r--r-- | spec/controllers/groups/group_members_controller_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb index 19655687028..ceea19af2f5 100644 --- a/spec/controllers/groups/group_members_controller_spec.rb +++ b/spec/controllers/groups/group_members_controller_spec.rb @@ -130,7 +130,7 @@ RSpec.describe Groups::GroupMembersController do access_level: Gitlab::Access::GUEST } - expect(response).to set_flash.to 'Users were successfully added.' + expect(controller).to set_flash.to 'Users were successfully added.' expect(response).to redirect_to(group_group_members_path(group)) expect(group.users).to include group_user end @@ -142,7 +142,7 @@ RSpec.describe Groups::GroupMembersController do access_level: Gitlab::Access::GUEST } - expect(response).to set_flash.to 'No users specified.' + expect(controller).to set_flash.to 'No users specified.' expect(response).to redirect_to(group_group_members_path(group)) expect(group.users).not_to include group_user end @@ -180,7 +180,7 @@ RSpec.describe Groups::GroupMembersController do it 'adds user to members' do subject - expect(response).to set_flash.to 'Users were successfully added.' + expect(controller).to set_flash.to 'Users were successfully added.' expect(response).to redirect_to(group_group_members_path(group)) expect(group.users).to include group_user end @@ -330,7 +330,7 @@ RSpec.describe Groups::GroupMembersController do it '[HTML] removes user from members' do delete :destroy, params: { group_id: group, id: member } - expect(response).to set_flash.to 'User was successfully removed from group.' + expect(controller).to set_flash.to 'User was successfully removed from group.' expect(response).to redirect_to(group_group_members_path(group)) expect(group.members).not_to include member expect(sub_group.members).to include sub_member @@ -339,7 +339,7 @@ RSpec.describe Groups::GroupMembersController do it '[HTML] removes user from members including subgroups and projects' do delete :destroy, params: { group_id: group, id: member, remove_sub_memberships: true } - expect(response).to set_flash.to 'User was successfully removed from group and any subgroups and projects.' + expect(controller).to set_flash.to 'User was successfully removed from group and any subgroups and projects.' expect(response).to redirect_to(group_group_members_path(group)) expect(group.members).not_to include member expect(sub_group.members).not_to include sub_member @@ -377,7 +377,7 @@ RSpec.describe Groups::GroupMembersController do it 'removes user from members' do delete :leave, params: { group_id: group } - expect(response).to set_flash.to "You left the \"#{group.name}\" group." + expect(controller).to set_flash.to "You left the \"#{group.name}\" group." expect(response).to redirect_to(dashboard_groups_path) expect(group.users).not_to include user end @@ -410,7 +410,7 @@ RSpec.describe Groups::GroupMembersController do it 'removes user from members' do delete :leave, params: { group_id: group } - expect(response).to set_flash.to 'Your access request to the group has been withdrawn.' + expect(controller).to set_flash.to 'Your access request to the group has been withdrawn.' expect(response).to redirect_to(group_path(group)) expect(group.requesters).to be_empty expect(group.users).not_to include user @@ -427,7 +427,7 @@ RSpec.describe Groups::GroupMembersController do it 'creates a new GroupMember that is not a team member' do post :request_access, params: { group_id: group } - expect(response).to set_flash.to 'Your request for access has been queued for review.' + expect(controller).to set_flash.to 'Your request for access has been queued for review.' expect(response).to redirect_to(group_path(group)) expect(group.requesters.exists?(user_id: user)).to be_truthy expect(group.users).not_to include user |