summaryrefslogtreecommitdiff
path: root/spec/support/email_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/email_helpers.rb')
-rw-r--r--spec/support/email_helpers.rb4
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