summaryrefslogtreecommitdiffstats
path: root/test/unit/mailer_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-15 10:32:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-15 10:32:03 +0000
commit13756eb3a830e04493ebc048ae72e9271df4411c (patch)
treeb17fdec14093c8e5e67ceba6452c0fcde857f93b /test/unit/mailer_test.rb
parentc6fc1a8047cb2707882cbc586065bf3bd7872aa2 (diff)
downloadredmine-13756eb3a830e04493ebc048ae72e9271df4411c.tar.gz
redmine-13756eb3a830e04493ebc048ae72e9271df4411c.zip
Fixed that links for relations in notifications do not include hostname (#15677).
git-svn-id: http://svn.redmine.org/redmine/trunk@12415 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r--test/unit/mailer_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index 138611bc1..9a0ff41eb 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -113,6 +113,16 @@ class MailerTest < ActiveSupport::TestCase
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)
+ Mailer.deliver_issue_edit(journal)
+ assert_not_nil last_email
+ assert_select_email do
+ assert_select 'a[href=?]', 'http://mydomain.foo/issues/2', :text => 'Feature request #2'
+ end
+ end
+
def test_generated_links_with_prefix_and_no_relative_url_root
Setting.default_language = 'en'
relative_url_root = Redmine::Utils.relative_url_root