diff --git a/spec/models/user_cleaner_spec.rb b/spec/models/user_cleaner_spec.rb index 5c8a2aa1e..0ac9d5527 100644 --- a/spec/models/user_cleaner_spec.rb +++ b/spec/models/user_cleaner_spec.rb @@ -252,7 +252,8 @@ def test_enqueues_additional_deletion_warning_mails(num_days) expect do UserCleaner.new.delete_users_according_to_deletion_date! - end.to have_enqueued_mail(UserCleanerMailer, :deletion_email) + end.to(have_enqueued_mail(UserCleanerMailer, :deletion_email) + .with { |args| expect(args).to include(user.email) }) end end end