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:
Marius Balteanu
2024-01-25 05:41:50 +00:00
parent e07452e921
commit 88a8234513
6 changed files with 29 additions and 28 deletions

View File

@@ -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