diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-19 11:01:46 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-19 11:01:46 +0000 |
commit | e4952f1703f6a5ad7d2ad4813dc6ccbee8daeaf9 (patch) | |
tree | 985eced4e3b1492045f50ded45908eb672cdf708 /spec/support | |
parent | 7805bf294ab3d7c6ac12c8031dec85f7f13a3d4e (diff) | |
parent | 23a20c20f826f090446587881df7008a137d2d34 (diff) | |
download | gitlab-ce-e4952f1703f6a5ad7d2ad4813dc6ccbee8daeaf9.tar.gz |
Merge branch '41532-email-reason' into 'master'
Show why a notification email was sent
Closes #41532 and #1366
See merge request gitlab-org/gitlab-ce!16160
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/email_helpers.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/email_helpers.rb b/spec/support/email_helpers.rb index b39052923dd..1fb8252459f 100644 --- a/spec/support/email_helpers.rb +++ b/spec/support/email_helpers.rb @@ -30,4 +30,8 @@ module EmailHelpers def email_recipients(kind: :to) ActionMailer::Base.deliveries.flat_map(&kind) end + + def find_email_for(user) + ActionMailer::Base.deliveries.find { |d| d.to.include?(user.notification_email) } + end end |