From 0a0d151bb8dd9c4a04befbaa302471860a530a94 Mon Sep 17 00:00:00 2001 From: Timm Date: Fri, 13 Sep 2013 15:52:39 +0200 Subject: Now returning html if html is blank? in FullSanitizer and WhiteListSanitizer. This means it'll return false if called with false, however that is not a valid use case. --- actionview/test/template/sanitizers_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionview/test') diff --git a/actionview/test/template/sanitizers_test.rb b/actionview/test/template/sanitizers_test.rb index dc511b6ec2..48079bf060 100644 --- a/actionview/test/template/sanitizers_test.rb +++ b/actionview/test/template/sanitizers_test.rb @@ -98,7 +98,7 @@ class SanitizersTest < ActionController::TestCase assert_equal("This is a test.", sanitizer.sanitize("

This is a test.

")) assert_equal("", sanitizer.sanitize("<<")) - + assert_equal("This is a test.", sanitizer.sanitize("This is a test.")) assert_equal "This has a here.", sanitizer.sanitize("This has a here.") @@ -219,7 +219,7 @@ class SanitizersTest < ActionController::TestCase def test_should_raise_argument_error_if_tags_is_not_enumerable sanitizer = ActionView::WhiteListSanitizer.new e = assert_raise(ArgumentError) do - sanitizer.sanitize('', :tags => 'foo') + sanitizer.sanitize('some html', :tags => 'foo') end assert_equal "You should pass :tags as an Enumerable", e.message @@ -228,7 +228,7 @@ class SanitizersTest < ActionController::TestCase def test_should_raise_argument_error_if_attributes_is_not_enumerable sanitizer = ActionView::WhiteListSanitizer.new e = assert_raise(ArgumentError) do - sanitizer.sanitize('', :attributes => 'foo') + sanitizer.sanitize('some html', :attributes => 'foo') end assert_equal "You should pass :attributes as an Enumerable", e.message @@ -242,7 +242,7 @@ class SanitizersTest < ActionController::TestCase end assert_raise Loofah::ScrubberNotFound do - sanitizer.sanitize('', :scrubber => scrubber) + sanitizer.sanitize('some html', :scrubber => scrubber) end end -- cgit v1.2.3