Adds #favicon_path and #favicon_url helpers.

git-svn-id: http://svn.redmine.org/redmine/trunk@12661 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-01-12 09:58:07 +00:00
parent 5df064ed85
commit 1eda38be4c
2 changed files with 37 additions and 2 deletions

View File

@@ -1264,4 +1264,26 @@ RAW
assert_equal '<h2>Foo &#187; Bar</h2>', title('Foo', 'Bar')
assert_equal 'Bar - Foo - Redmine', html_title
end
def test_favicon_path
assert_match %r{^/favicon\.ico}, favicon_path
end
def test_favicon_path_with_suburi
Redmine::Utils.relative_url_root = '/foo'
assert_match %r{^/foo/favicon\.ico}, favicon_path
ensure
Redmine::Utils.relative_url_root = ''
end
def test_favicon_url
assert_match %r{^http://test\.host/favicon\.ico}, favicon_url
end
def test_favicon_url_with_suburi
Redmine::Utils.relative_url_root = '/foo'
assert_match %r{^http://test\.host/foo/favicon\.ico}, favicon_url
ensure
Redmine::Utils.relative_url_root = ''
end
end