diff options
author | Paul Grayson <paul@pololu.com> | 2014-06-10 17:33:34 -0700 |
---|---|---|
committer | Paul Grayson <paul@pololu.com> | 2014-06-12 15:30:40 -0700 |
commit | bcab3f20dac0fe993e5d31bf6acef28ec54e658b (patch) | |
tree | f3fd8f027b75814410245c91aa87963be1c9f00a /actionview/test/template/output_safety_helper_test.rb | |
parent | 80b4fe2c50feb295af64e1a8c960cfed4fd8ae19 (diff) | |
download | rails-bcab3f20dac0fe993e5d31bf6acef28ec54e658b.tar.gz rails-bcab3f20dac0fe993e5d31bf6acef28ec54e658b.tar.bz2 rails-bcab3f20dac0fe993e5d31bf6acef28ec54e658b.zip |
In tag helper, honor html_safe on array parameters; also make safe_join more similar to Array.join by first calling flatten.
Diffstat (limited to 'actionview/test/template/output_safety_helper_test.rb')
-rw-r--r-- | actionview/test/template/output_safety_helper_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionview/test/template/output_safety_helper_test.rb b/actionview/test/template/output_safety_helper_test.rb index 76c71c9e6d..a1bf0e1a5f 100644 --- a/actionview/test/template/output_safety_helper_test.rb +++ b/actionview/test/template/output_safety_helper_test.rb @@ -25,4 +25,11 @@ class OutputSafetyHelperTest < ActionView::TestCase assert_equal "<p>foo</p><br /><p>bar</p>", joined end -end
\ No newline at end of file + test "safe_join should work recursively similarly to Array.join" do + joined = safe_join(['a',['b','c']], ':') + assert_equal 'a:b:c', joined + + joined = safe_join(['"a"',['<b>','<c>']], ' <br/> ') + assert_equal '"a" <br/> <b> <br/> <c>', joined + end +end |