aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-01-26 01:13:00 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-01-26 01:13:20 +0300
commit858f4646fe72e151e1af0d217a43e299cee3fc6d (patch)
treeb8a24412002f8a1e02b9da1a5abe7b1beb7099bc /actionpack/test/template
parentfc5478799be56aa23cdbe787ccdedeac0da146b0 (diff)
downloadrails-858f4646fe72e151e1af0d217a43e299cee3fc6d.tar.gz
rails-858f4646fe72e151e1af0d217a43e299cee3fc6d.tar.bz2
rails-858f4646fe72e151e1af0d217a43e299cee3fc6d.zip
reuse common video/audio tags code and do not modify options
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 92e053134f..3422a5efbd 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -494,6 +494,14 @@ class AssetTagHelperTest < ActionView::TestCase
AudioLinkToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) }
end
+ def test_video_audio_tag_does_not_modify_options
+ options = {:autoplay => true}
+ video_tag('video', options)
+ assert_equal({:autoplay => true}, options)
+ audio_tag('audio', options)
+ assert_equal({:autoplay => true}, options)
+ end
+
def test_timebased_asset_id
expected_time = File.mtime(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).to_i.to_s
assert_equal %(<img alt="Rails" src="/images/rails.png?#{expected_time}" />), image_tag("rails.png")