diff options
author | Go MAEDA <maeda@farend.jp> | 2020-03-07 08:20:26 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-03-07 08:20:26 +0000 |
commit | a8ed1c7c5f8a2a3811c23564cf7378b15609f62b (patch) | |
tree | 3d6e3ad8e789a666f86af77c328fb107f3a59a5e /test/unit/mailer_test.rb | |
parent | 36143469625410bab07ac3ed90be1bef2f7e1a9e (diff) | |
download | redmine-a8ed1c7c5f8a2a3811c23564cf7378b15609f62b.tar.gz redmine-a8ed1c7c5f8a2a3811c23564cf7378b15609f62b.zip |
Add a link to the issues list in a reminder email (#33099).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@19565 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 31fe956c7..3f6e974ca 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -676,7 +676,8 @@ class MailerTest < ActiveSupport::TestCase def test_reminders users(:users_003).pref.update_attribute :time_zone, 'UTC' # dlopper - Mailer.reminders(:days => 42) + days = 42 + Mailer.reminders(:days => days) assert_equal 1, ActionMailer::Base.deliveries.size mail = last_email assert mail.bcc.include?('dlopper@somenet.foo') @@ -684,11 +685,14 @@ class MailerTest < ActiveSupport::TestCase assert_mail_body_match 'View all issues (2 open)', mail assert_select_email do assert_select 'a[href=?]', + "http://localhost:3000/issues?f%5B%5D=status_id&f%5B%5D=assigned_to_id&f%5B%5D=due_date&op%5Bassigned_to_id%5D=%3D&op%5Bdue_date%5D=%3Ct%2B&op%5Bstatus_id%5D=o&set_filter=1&sort=due_date%3Aasc&v%5Bassigned_to_id%5D%5B%5D=me&v%5Bdue_date%5D%5B%5D=#{days}", + :text => '1' + assert_select 'a[href=?]', 'http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc', :text => 'View all issues' assert_select '/p:nth-last-of-type(1)', :text => 'View all issues (2 open)' end - assert_equal '1 issue(s) due in the next 42 days', mail.subject + assert_equal "1 issue(s) due in the next #{days} days", mail.subject end def test_reminders_language_auto |