mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #27688 from kenta-s/add-test-for-safe_join
Add test for `safe_join`
This commit is contained in:
commit
0e119480fc
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ class OutputSafetyHelperTest < ActionView::TestCase
|
|||
assert_equal ""a" <br/> <b> <br/> <c>", joined
|
||||
end
|
||||
|
||||
test "safe_join should return the safe string separated by $, when second argument is not passed" do
|
||||
joined = safe_join(["a", "b"])
|
||||
assert_equal "a#{$,}b", joined
|
||||
end
|
||||
|
||||
test "to_sentence should escape non-html_safe values" do
|
||||
actual = to_sentence(%w(< > & ' "))
|
||||
assert actual.html_safe?
|
||||
|
|
Loading…
Reference in a new issue