summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-03 22:33:24 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-03 22:33:24 +0000
commitc2389242a9be736ab167c43ae4e505385f3544e5 (patch)
treeae99318066d15e8e8296be6f8b9b3fe749fda028
parent3ba9d27ddb2c829f0dfcb02107f3c45121dba7c6 (diff)
downloadredmine-c2389242a9be736ab167c43ae4e505385f3544e5.tar.gz
redmine-c2389242a9be736ab167c43ae4e505385f3544e5.zip
Merged r17918 from trunk to 4.0-stable (#30955).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17919 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/mailer.rb2
-rw-r--r--test/unit/mailer_test.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 492ca976d..58fe1d5f7 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -539,7 +539,7 @@ class Mailer < ActionMailer::Base
@issues = issues
@days = days
@issues_url = url_for(:controller => 'issues', :action => 'index',
- :set_filter => 1, :assigned_to_id => user.id,
+ :set_filter => 1, :assigned_to_id => 'me',
:sort => 'due_date:asc')
mail :to => user,
:subject => l(:mail_subject_reminder, :count => issues.size, :days => days)
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index d61479202..87171b42b 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -525,6 +525,11 @@ class MailerTest < ActiveSupport::TestCase
mail = last_email
assert mail.bcc.include?('dlopper@somenet.foo')
assert_mail_body_match 'Bug #3: Error 281 when updating a recipe', mail
+ assert_select_email do
+ assert_select 'a[href=?]',
+ 'http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc',
+ :text => 'View all issues'
+ end
assert_equal '1 issue(s) due in the next 42 days', mail.subject
end