From 5b48e4ae58ec969d43a778a4492bce734f9d69aa Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 20 Feb 2012 14:36:43 +0000 Subject: [PATCH] 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 --- test/unit/mailer_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 9e32918bf..b99d50cbf 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -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 -- 2.39.5