use assert_select instead of include? at "test_register" of unit mailer test
On Rails 3.0.11, token breaks with new line. So, test fails. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8916 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a9161a3fde
commit
5b48e4ae58
|
@ -426,7 +426,11 @@ class MailerTest < ActiveSupport::TestCase
|
|||
ActionMailer::Base.deliveries.clear
|
||||
assert Mailer.deliver_register(token)
|
||||
mail = ActionMailer::Base.deliveries.last
|
||||
assert mail.body.include?("https://redmine.foo/account/activate?token=#{token.value}")
|
||||
assert_select_email do
|
||||
assert_select "a[href=?]",
|
||||
"https://redmine.foo/account/activate?token=#{token.value}",
|
||||
:text => "https://redmine.foo/account/activate?token=#{token.value}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue