aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/output_safety_helper_test.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-01-20 12:25:06 +0530
committerVipul A M <vipulnsward@gmail.com>2016-01-20 12:38:59 +0530
commitb387d9a14aeecc372f49544d927b2f24d5a39d49 (patch)
treea33ea10a967587a3d598c348a89acfb099255d1f /actionview/test/template/output_safety_helper_test.rb
parent56a9341689942146d350ff931497956a15152bdb (diff)
downloadrails-b387d9a14aeecc372f49544d927b2f24d5a39d49.tar.gz
rails-b387d9a14aeecc372f49544d927b2f24d5a39d49.tar.bz2
rails-b387d9a14aeecc372f49544d927b2f24d5a39d49.zip
html_safe is not supposed to be public API for AV. This change removes usage of html_safe in favour of raw() in AV helpers.
Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
Diffstat (limited to 'actionview/test/template/output_safety_helper_test.rb')
-rw-r--r--actionview/test/template/output_safety_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/test/template/output_safety_helper_test.rb b/actionview/test/template/output_safety_helper_test.rb
index a1bf0e1a5f..8de0ae2f6f 100644
--- a/actionview/test/template/output_safety_helper_test.rb
+++ b/actionview/test/template/output_safety_helper_test.rb
@@ -18,10 +18,10 @@ class OutputSafetyHelperTest < ActionView::TestCase
end
test "safe_join should html_escape any items, including the separator, if they are not html_safe" do
- joined = safe_join(["<p>foo</p>".html_safe, "<p>bar</p>"], "<br />")
+ joined = safe_join([raw("<p>foo</p>"), "<p>bar</p>"], "<br />")
assert_equal "<p>foo</p>&lt;br /&gt;&lt;p&gt;bar&lt;/p&gt;", joined
- joined = safe_join(["<p>foo</p>".html_safe, "<p>bar</p>".html_safe], "<br />".html_safe)
+ joined = safe_join([raw("<p>foo</p>"), raw("<p>bar</p>")], raw("<br />"))
assert_equal "<p>foo</p><br /><p>bar</p>", joined
end