diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-03-07 12:45:46 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-03-07 12:45:46 +0000 |
commit | e67fbdc315a970758eb0728ca194d07534498dbb (patch) | |
tree | a74dcbcdd8faeb15ef3658587f1ce1977cc6ab09 /test/unit/mailer_test.rb | |
parent | 36a55a09258d6d99e00f7cee578a9d1be1d0fdf9 (diff) | |
download | redmine-e67fbdc315a970758eb0728ca194d07534498dbb.tar.gz redmine-e67fbdc315a970758eb0728ca194d07534498dbb.zip |
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
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 156938963..e3eb65ae4 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -207,10 +207,16 @@ class MailerTest < Test::Unit::TestCase def test_register token = Token.find(1) + Setting.host_name = 'redmine.foo' + Setting.protocol = 'https' + valid_languages.each do |lang| token.user.update_attribute :language, lang.to_s token.reload + 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}") end end |