diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-14 08:52:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-14 08:52:48 +0000 |
commit | 104615cb6fd378f1253addfcbeed18c39c74ac85 (patch) | |
tree | 8120a2ae66efa60983442eacd5114d6a054793dc /test | |
parent | 5da48d929367df231df8dde382bdb8e5eb7e1540 (diff) | |
download | redmine-104615cb6fd378f1253addfcbeed18c39c74ac85.tar.gz redmine-104615cb6fd378f1253addfcbeed18c39c74ac85.zip |
Incorrect links generated in emails if host setup uses other port (#19323).
git-svn-id: http://svn.redmine.org/redmine/trunk@14081 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mailer_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 3dd2a2963..52b6a62ee 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -119,6 +119,24 @@ class MailerTest < ActiveSupport::TestCase end end + def test_generated_links_with_port_and_prefix + with_settings :host_name => '10.0.0.1:81/redmine', :protocol => 'http' do + Mailer.test_email(User.find(1)).deliver + mail = last_email + assert_not_nil mail + assert_include 'http://10.0.0.1:81/redmine', mail_body(mail) + end + end + + def test_generated_links_with_port + with_settings :host_name => '10.0.0.1:81', :protocol => 'http' do + Mailer.test_email(User.find(1)).deliver + mail = last_email + assert_not_nil mail + assert_include 'http://10.0.0.1:81', mail_body(mail) + end + end + def test_issue_edit_should_generate_url_with_hostname_for_relations journal = Journal.new(:journalized => Issue.find(1), :user => User.find(1), :created_on => Time.now) journal.details << JournalDetail.new(:property => 'relation', :prop_key => 'label_relates_to', :value => 2) |