From 92036616db6d09f194427986504debb16d5db947 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 17 May 2017 19:30:13 +0800 Subject: [PATCH] Make test less vulnerable to changes. --- spec/mailers/user_notifications_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb index e2fb6be0647..39ed87a35dc 100644 --- a/spec/mailers/user_notifications_spec.rb +++ b/spec/mailers/user_notifications_spec.rb @@ -405,8 +405,8 @@ describe UserNotifications do # WARNING: you reached the limit of 100 email notifications per day. Further emails will be suppressed. # Consider watching less topics or disabling mailing list mode. - expect(mail.html_part.to_s).to match("To protect your inbox") - expect(mail.body.to_s).to match("To protect your inbox") + expect(mail.html_part.to_s).to match(I18n.t("user_notifications.reached_limit", count: 2)) + expect(mail.body.to_s).to match(I18n.t("user_notifications.reached_limit", count: 2)) end def expects_build_with(condition)