diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-11 11:26:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-11 11:26:53 +0000 |
commit | fa52c5d9fc602981ac3d862b4a2ec7a5a70c0b9e (patch) | |
tree | d4f51da5535e6eb2c8f0852febfebf8a5f261cbd /test/integration | |
parent | 8b999962dec50fc4599f77c1a23fbdc7b43dab21 (diff) | |
download | redmine-fa52c5d9fc602981ac3d862b4a2ec7a5a70c0b9e.tar.gz redmine-fa52c5d9fc602981ac3d862b4a2ec7a5a70c0b9e.zip |
Use #assert_select instead of #assert_tag.
git-svn-id: http://svn.redmine.org/redmine/trunk@12647 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/lib/redmine/themes_test.rb | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb index da413db35..169a9f151 100644 --- a/test/integration/lib/redmine/themes_test.rb +++ b/test/integration/lib/redmine/themes_test.rb @@ -32,16 +32,14 @@ class ThemesTest < ActionController::IntegrationTest get '/' assert_response :success - assert_tag :tag => 'link', - :attributes => {:href => %r{^/themes/#{@theme.dir}/stylesheets/application.css}} + assert_select "link[href^=/themes/#{@theme.dir}/stylesheets/application.css]" end def test_without_theme_js get '/' assert_response :success - assert_no_tag :tag => 'script', - :attributes => {:src => %r{^/themes/#{@theme.dir}/javascripts/theme.js}} + assert_select "script[src^=/themes/#{@theme.dir}/javascripts/theme.js]", 0 end def test_with_theme_js @@ -50,9 +48,7 @@ class ThemesTest < ActionController::IntegrationTest get '/' assert_response :success - assert_tag :tag => 'script', - :attributes => {:src => %r{^/themes/#{@theme.dir}/javascripts/theme.js}} - + assert_select "script[src^=/themes/#{@theme.dir}/javascripts/theme.js]", 1 ensure @theme.javascripts.delete 'theme' end @@ -94,10 +90,8 @@ class ThemesTest < ActionController::IntegrationTest 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}} + assert_select "link[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 = '' |