mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Fix tests after asset pipeline implementation (#39111).
Patch by Takashi Kato (@tohosaku). git-svn-id: https://svn.redmine.org/redmine/trunk@22628 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -2037,16 +2037,16 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
end
|
||||
|
||||
def test_stylesheet_link_tag_should_pick_the_default_stylesheet
|
||||
assert_match 'href="/stylesheets/styles.css"', stylesheet_link_tag("styles")
|
||||
assert_match 'href="/assets/styles.css"', stylesheet_link_tag("styles")
|
||||
end
|
||||
|
||||
def test_stylesheet_link_tag_for_plugin_should_pick_the_plugin_stylesheet
|
||||
assert_match 'href="/plugin_assets/foo/stylesheets/styles.css"',
|
||||
assert_match 'href="/assets/plugin_assets/foo/styles.css"',
|
||||
stylesheet_link_tag("styles", :plugin => :foo)
|
||||
end
|
||||
|
||||
def test_image_tag_should_pick_the_default_image
|
||||
assert_match 'src="/images/image.png"', image_tag("image.png")
|
||||
assert_match 'src="/assets/image.png"', image_tag("image.png")
|
||||
end
|
||||
|
||||
def test_image_tag_should_pick_the_theme_image_if_it_exists
|
||||
@@ -2054,23 +2054,23 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
theme.images << 'image.png'
|
||||
|
||||
with_settings :ui_theme => theme.id do
|
||||
assert_match %|src="/themes/#{theme.dir}/images/image.png"|, image_tag("image.png")
|
||||
assert_match %|src="/images/other.png"|, image_tag("other.png")
|
||||
assert_match %|src="/assets/themes/#{theme.dir}/image.png"|, image_tag("image.png")
|
||||
assert_match %|src="/assets/other.png"|, image_tag("other.png")
|
||||
end
|
||||
ensure
|
||||
theme.images.delete 'image.png'
|
||||
end
|
||||
|
||||
def test_image_tag_sfor_plugin_should_pick_the_plugin_image
|
||||
assert_match 'src="/plugin_assets/foo/images/image.png"', image_tag("image.png", :plugin => :foo)
|
||||
assert_match 'src="/assets/plugin_assets/foo/image.png"', image_tag("image.png", :plugin => :foo)
|
||||
end
|
||||
|
||||
def test_javascript_include_tag_should_pick_the_default_javascript
|
||||
assert_match 'src="/javascripts/scripts.js"', javascript_include_tag("scripts")
|
||||
assert_match 'src="/assets/scripts.js"', javascript_include_tag("scripts")
|
||||
end
|
||||
|
||||
def test_javascript_include_tag_for_plugin_should_pick_the_plugin_javascript
|
||||
assert_match 'src="/plugin_assets/foo/javascripts/scripts.js"', javascript_include_tag("scripts", :plugin => :foo)
|
||||
assert_match 'src="/assets/plugin_assets/foo/scripts.js"', javascript_include_tag("scripts", :plugin => :foo)
|
||||
end
|
||||
|
||||
def test_raw_json_should_escape_closing_tags
|
||||
|
||||
Reference in New Issue
Block a user