aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-06-29 10:48:47 +0200
committerYves Senn <yves.senn@gmail.com>2015-06-29 10:52:00 +0200
commitd4b0e5f59f599a386d43a7f4d005430e87ae7ec4 (patch)
tree1b5ea08e90994d3a7dfb3c804afd7b5df33cd0b1 /actionview/test
parentc90c9b2daa133341ad8ceca2d8010ba7d47c4957 (diff)
parent42a1b0c7c31400c762e2f8d1aff16338bbe8d63d (diff)
downloadrails-d4b0e5f59f599a386d43a7f4d005430e87ae7ec4.tar.gz
rails-d4b0e5f59f599a386d43a7f4d005430e87ae7ec4.tar.bz2
rails-d4b0e5f59f599a386d43a7f4d005430e87ae7ec4.zip
Merge pull request #20669 from akolomiychuk/image-path
Passing nil to image_tag
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/asset_tag_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb
index 6e6ce20924..01fc66bed6 100644
--- a/actionview/test/template/asset_tag_helper_test.rb
+++ b/actionview/test/template/asset_tag_helper_test.rb
@@ -310,6 +310,11 @@ class AssetTagHelperTest < ActionView::TestCase
AssetPathToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) }
end
+ def test_asset_path_tag_raises_an_error_for_nil_source
+ e = assert_raise(ArgumentError) { asset_path(nil) }
+ assert_equal("nil is not a valid asset source", e.message)
+ end
+
def test_asset_path_tag_to_not_create_duplicate_slashes
@controller.config.asset_host = "host/"
assert_dom_equal('http://host/foo', asset_path("foo"))