Test that account activation email contains the appropriate link (#2825).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2561 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
36a55a0925
commit
e67fbdc315
|
@ -207,10 +207,16 @@ class MailerTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_register
|
def test_register
|
||||||
token = Token.find(1)
|
token = Token.find(1)
|
||||||
|
Setting.host_name = 'redmine.foo'
|
||||||
|
Setting.protocol = 'https'
|
||||||
|
|
||||||
valid_languages.each do |lang|
|
valid_languages.each do |lang|
|
||||||
token.user.update_attribute :language, lang.to_s
|
token.user.update_attribute :language, lang.to_s
|
||||||
token.reload
|
token.reload
|
||||||
|
ActionMailer::Base.deliveries.clear
|
||||||
assert Mailer.deliver_register(token)
|
assert Mailer.deliver_register(token)
|
||||||
|
mail = ActionMailer::Base.deliveries.last
|
||||||
|
assert mail.body.include?("https://redmine.foo/account/activate?token=#{token.value}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue