summaryrefslogtreecommitdiffstats
path: root/test/integration/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 17:02:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 17:02:55 +0000
commitd85f73a30d48b3472346fb712106e6d5f4403278 (patch)
tree35d9205b3bf1da3c4e1cc9fc7699f798395d4702 /test/integration/lib
parent3ea8b706978b490fc54cde8e14dcde2a748dec1a (diff)
downloadredmine-d85f73a30d48b3472346fb712106e6d5f4403278.tar.gz
redmine-d85f73a30d48b3472346fb712106e6d5f4403278.zip
Upgrade to Rails 4.2.0 (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13892 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/lib')
-rw-r--r--test/integration/lib/redmine/themes_test.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb
index f38f722ca..66cfea208 100644
--- a/test/integration/lib/redmine/themes_test.rb
+++ b/test/integration/lib/redmine/themes_test.rb
@@ -20,6 +20,7 @@ require File.expand_path('../../../../test_helper', __FILE__)
class ThemesTest < Redmine::IntegrationTest
def setup
+ Redmine::Themes.rescan
@theme = Redmine::Themes.themes.last
Setting.ui_theme = @theme.id
end
@@ -32,14 +33,14 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select "link[rel=stylesheet][href^=/themes/#{@theme.dir}/stylesheets/application.css]"
+ assert_select "link[rel=stylesheet][href^=?]", "/themes/#{@theme.dir}/stylesheets/application.css"
end
def test_without_theme_js
get '/'
assert_response :success
- assert_select "script[src^=/themes/#{@theme.dir}/javascripts/theme.js]", 0
+ assert_select "script[src^=?]", "/themes/#{@theme.dir}/javascripts/theme.js", 0
end
def test_with_theme_js
@@ -48,7 +49,7 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select "script[src^=/themes/#{@theme.dir}/javascripts/theme.js]", 1
+ assert_select "script[src^=?]", "/themes/#{@theme.dir}/javascripts/theme.js", 1
ensure
@theme.javascripts.delete 'theme'
end
@@ -57,7 +58,7 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select 'link[rel=shortcut icon][href^=/favicon.ico]'
+ assert_select 'link[rel="shortcut icon"][href^="/favicon.ico"]'
end
def test_use_theme_favicon_if_theme_provides_one
@@ -66,7 +67,7 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select "link[rel=shortcut icon][href^=/themes/#{@theme.dir}/favicon/a.ico]"
+ assert_select 'link[rel="shortcut icon"][href^=?]', "/themes/#{@theme.dir}/favicon/a.ico"
ensure
@theme.favicons.delete 'a.ico'
end
@@ -76,8 +77,8 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select "link[rel=shortcut icon]", 1
- assert_select "link[rel=shortcut icon][href^=/themes/#{@theme.dir}/favicon/b.ico]"
+ assert_select 'link[rel="shortcut icon"]', 1
+ assert_select 'link[rel="shortcut icon"][href^=?]', "/themes/#{@theme.dir}/favicon/b.ico"
ensure
@theme.favicons.delete("b.ico")
@theme.favicons.delete("a.png")
@@ -90,9 +91,9 @@ class ThemesTest < Redmine::IntegrationTest
get '/'
assert_response :success
- assert_select "link[rel=stylesheet][href^=/foo/themes/#{@theme.dir}/stylesheets/application.css]"
- assert_select "script[src^=/foo/themes/#{@theme.dir}/javascripts/theme.js]"
- assert_select "link[rel=shortcut icon][href^=/foo/themes/#{@theme.dir}/favicon/a.ico]"
+ assert_select "link[rel=stylesheet][href^=?]", "/foo/themes/#{@theme.dir}/stylesheets/application.css"
+ assert_select "script[src^=?]", "/foo/themes/#{@theme.dir}/javascripts/theme.js"
+ assert_select 'link[rel="shortcut icon"][href^=?]', "/foo/themes/#{@theme.dir}/favicon/a.ico"
ensure
Redmine::Utils.relative_url_root = ''
end