summaryrefslogtreecommitdiff
path: root/spec/services/members
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-17 16:33:37 +0200
committerRémy Coutable <remy@rymai.me>2016-06-18 05:46:45 +0200
commita08a26ac814d7fd9f7523e22847fab0cc25ceb78 (patch)
treea0b7594e3b12d14cdd1e80adf893c79455d605bf /spec/services/members
parent724f986fb2cf8fee3606bffd01da9842634400ef (diff)
downloadgitlab-ce-a08a26ac814d7fd9f7523e22847fab0cc25ceb78.tar.gz
Don't send the "access declined" email on access request withdrawal
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/services/members')
-rw-r--r--spec/services/members/destroy_service_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/members/destroy_service_spec.rb b/spec/services/members/destroy_service_spec.rb
index aa002b4bd22..04c2782c125 100644
--- a/spec/services/members/destroy_service_spec.rb
+++ b/spec/services/members/destroy_service_spec.rb
@@ -34,6 +34,14 @@ describe Members::DestroyService, services: true do
destroy_member(member, user)
end
+
+ context 'when current user is the member' do
+ it 'does not call Member#after_decline_request' do
+ expect_any_instance_of(NotificationService).not_to receive(:decline_access_request).with(member)
+
+ destroy_member(member, member.user)
+ end
+ end
end
end