]> source.dussan.org Git - redmine.git/commitdiff
Adds themes test for when Redmine is in a sub-uri.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 23 Dec 2010 09:42:33 +0000 (09:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 23 Dec 2010 09:42:33 +0000 (09:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4560 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/lib/redmine/themes_test.rb

index d106d8fc5009157555e80c8ebfb3d6f9dd9fc83c..ad63d97bbccada0224d607ebf9d5582b5d4db16c 100644 (file)
@@ -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