Slight changes to ease Rails 2.2 support.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2234 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -40,11 +40,11 @@ class MailerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_generated_links_with_prefix
|
||||
relative_url_root = ActionController::AbstractRequest.relative_url_root
|
||||
relative_url_root = Redmine::Utils.relative_url_root
|
||||
ActionMailer::Base.deliveries.clear
|
||||
Setting.host_name = 'mydomain.foo/rdm'
|
||||
Setting.protocol = 'http'
|
||||
ActionController::AbstractRequest.relative_url_root = '/rdm'
|
||||
Redmine::Utils.relative_url_root = '/rdm'
|
||||
|
||||
journal = Journal.find(2)
|
||||
assert Mailer.deliver_issue_edit(journal)
|
||||
@@ -60,15 +60,15 @@ class MailerTest < Test::Unit::TestCase
|
||||
assert mail.body.include?('<a href="http://mydomain.foo/rdm/repositories/revision/ecookbook/2" class="changeset" title="This commit fixes #1, #2 and references #1 & #3">r2</a>')
|
||||
ensure
|
||||
# restore it
|
||||
ActionController::AbstractRequest.relative_url_root = relative_url_root
|
||||
Redmine::Utils.relative_url_root = relative_url_root
|
||||
end
|
||||
|
||||
def test_generated_links_with_prefix_and_no_relative_url_root
|
||||
relative_url_root = ActionController::AbstractRequest.relative_url_root
|
||||
relative_url_root = Redmine::Utils.relative_url_root
|
||||
ActionMailer::Base.deliveries.clear
|
||||
Setting.host_name = 'mydomain.foo/rdm'
|
||||
Setting.protocol = 'http'
|
||||
ActionController::AbstractRequest.relative_url_root = nil
|
||||
Redmine::Utils.relative_url_root = nil
|
||||
|
||||
journal = Journal.find(2)
|
||||
assert Mailer.deliver_issue_edit(journal)
|
||||
@@ -84,7 +84,7 @@ class MailerTest < Test::Unit::TestCase
|
||||
assert mail.body.include?('<a href="http://mydomain.foo/rdm/repositories/revision/ecookbook/2" class="changeset" title="This commit fixes #1, #2 and references #1 & #3">r2</a>')
|
||||
ensure
|
||||
# restore it
|
||||
ActionController::AbstractRequest.relative_url_root = relative_url_root
|
||||
Redmine::Utils.relative_url_root = relative_url_root
|
||||
end
|
||||
|
||||
def test_plain_text_mail
|
||||
|
||||
Reference in New Issue
Block a user