From f31a386c7ecdfe8a9173655b515470a2fbc9fcdd Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 26 Jan 2016 15:43:29 -0500 Subject: Fix sanitizer tests These tests were failing due to backwards incompatible changes, as apart of the v1.0.3 release of rails-html-sanitizer. --- actionview/test/template/text_helper_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionview/test') diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb index fb98ac6330..03c7597505 100644 --- a/actionview/test/template/text_helper_test.rb +++ b/actionview/test/template/text_helper_test.rb @@ -43,11 +43,11 @@ class TextHelperTest < ActionView::TestCase end def test_simple_format_should_sanitize_input_when_sanitize_option_is_not_false - assert_equal "

test with unsafe string

", simple_format(" test with unsafe string ") + assert_equal "

test with unsafe string code!

", simple_format(" test with unsafe string ") end def test_simple_format_should_sanitize_input_when_sanitize_option_is_true - assert_equal '

test with unsafe string

', + assert_equal '

test with unsafe string code!

', simple_format(' test with unsafe string ', {}, sanitize: true) end @@ -198,7 +198,7 @@ class TextHelperTest < ActionView::TestCase def test_highlight_should_sanitize_input assert_equal( - "This is a beautiful morning", + "This is a beautiful morningcode!", highlight("This is a beautiful morning", "beautiful") ) end -- cgit v1.2.3 From e5e42a3687801a1dc1c3e36ea784a7a1479a9230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 27 Jan 2016 14:12:32 -0500 Subject: Add tests to #23288 --- actionview/test/template/asset_tag_helper_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionview/test') diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index 8592a2a083..8bfd19eb26 100644 --- a/actionview/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb @@ -459,6 +459,7 @@ class AssetTagHelperTest < ActionView::TestCase [nil, '/', '/foo/bar/', 'foo/bar/'].each do |prefix| assert_equal 'Rails', image_alt("#{prefix}rails.png") assert_equal 'Rails', image_alt("#{prefix}rails-9c0a079bdd7701d7e729bd956823d153.png") + assert_equal 'Rails', image_alt("#{prefix}rails-f56ef62bc41b040664e801a38f068082a75d506d9048307e8096737463503d0b.png") assert_equal 'Long file name with hyphens', image_alt("#{prefix}long-file-name-with-hyphens.png") assert_equal 'Long file name with underscores', image_alt("#{prefix}long_file_name_with_underscores.png") end -- cgit v1.2.3