diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-23 09:42:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-23 09:42:33 +0000 |
commit | 3b53ec20e672bee080b49b67c0e2598ce57063ee (patch) | |
tree | 29e9643e6e6c5efbe2b5a61654fe4d16430c9d38 /test/integration | |
parent | c8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe (diff) | |
download | redmine-3b53ec20e672bee080b49b67c0e2598ce57063ee.tar.gz redmine-3b53ec20e672bee080b49b67c0e2598ce57063ee.zip |
Adds themes test for when Redmine is in a sub-uri.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4560 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/lib/redmine/themes_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb index d106d8fc5..ad63d97bb 100644 --- a/test/integration/lib/redmine/themes_test.rb +++ b/test/integration/lib/redmine/themes_test.rb @@ -57,4 +57,19 @@ class ThemesTest < ActionController::IntegrationTest ensure @theme.javascripts.delete 'theme' end + + def test_with_sub_uri + Redmine::Utils.relative_url_root = '/foo' + @theme.javascripts << 'theme' + get '/' + + assert_response :success + assert_tag :tag => 'link', + :attributes => {:href => %r{^/foo/themes/#{@theme.dir}/stylesheets/application.css}} + assert_tag :tag => 'script', + :attributes => {:src => %r{^/foo/themes/#{@theme.dir}/javascripts/theme.js}} + + ensure + Redmine::Utils.relative_url_root = '' + end end |