diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-14 21:10:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-14 21:10:59 +0300 |
commit | ea3306a15e945e694afba62dc93b17500ffaec7f (patch) | |
tree | aa444f7fe503e5650bfdb6500ed428b4619ff37b /spec/services/notification_service_spec.rb | |
parent | 8106ac487c3b52471e2ca894c65c13162c2fb1a8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 9431c023850..85234077b1f 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -2455,6 +2455,18 @@ RSpec.describe NotificationService, :mailer do let(:notification_trigger) { group.add_guest(added_user) } end end + + describe '#updated_group_member_expiration' do + let_it_be(:group_member) { create(:group_member) } + + it 'emails the user that their group membership expiry has changed' do + expect_next_instance_of(NotificationService) do |notification| + allow(notification).to receive(:updated_group_member_expiration).with(group_member) + end + + group_member.update!(expires_at: 5.days.from_now) + end + end end describe 'ProjectMember', :deliver_mails_inline do |