diff --git a/app/models/change_password.rb b/app/models/change_password.rb index 60db0af..8c4f754 100644 --- a/app/models/change_password.rb +++ b/app/models/change_password.rb @@ -86,7 +86,7 @@ class ChangePassword < Task code = self.code url = url_for(:host => hostname, :controller => 'account', :action => 'new_password', :code => code) - lambda do + proc do _("In order to change your password, please visit the following address:\n\n%s") % url end end diff --git a/test/unit/change_password_test.rb b/test/unit/change_password_test.rb index 2fe8740..bb70b93 100644 --- a/test/unit/change_password_test.rb +++ b/test/unit/change_password_test.rb @@ -144,8 +144,9 @@ class ChangePasswordTest < ActiveSupport::TestCase person = fast_create(Person, :identifier => 'testuser') task = ChangePassword.create(:login => 'testuser', :email => 'test@example.com', :environment_id => Environment.default.id) + task.requestor.stubs(:notification_emails).returns(['random@example.org']) - email = TaskMailer.deliver_task_created(task) + email = task.send(:send_notification, :created).deliver assert_match(/#{task.requestor.name} wants to change its password/, email.subject) end -- libgit2 0.21.2