From 7508c0e9d3b126da1a443272550b80c6744e6f39 Mon Sep 17 00:00:00 2001 From: rohit Date: Sat, 12 Jun 2010 18:35:49 +0530 Subject: Change sanitize to escape in test names of text_helper_test [#4844 state:resolved] --- actionpack/test/template/text_helper_test.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 108cf510ff..b0a4c2a9cc 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -40,15 +40,15 @@ class TextHelperTest < ActionView::TestCase assert simple_format(" test with html tags ").html_safe? end - def test_simple_format_should_sanitize_unsafe_input + def test_simple_format_should_escape_unsafe_input assert_equal "

<b> test with unsafe string </b><script>code!</script>

", simple_format(" test with unsafe string ") end - def test_simple_format_should_not_sanitize_input_if_safe_option + def test_simple_format_should_not_escape_input_if_safe_option assert_equal "

test with unsafe string

", simple_format(" test with unsafe string ", {}, :safe => true) end - def test_simple_format_should_not_sanitize_safe_input + def test_simple_format_should_not_escape_safe_input assert_equal "

test with safe string

", simple_format(" test with safe string ".html_safe) end @@ -61,16 +61,16 @@ class TextHelperTest < ActionView::TestCase assert_equal "Hello Wor...", truncate("Hello World!!", :length => 12) end - def test_truncate_should_sanitize_unsafe_input + def test_truncate_should_escape_unsafe_input assert_equal "Hello <...", truncate("Hello World!!", :length => 12) end - def test_truncate_should_not_sanitize_input_if_safe_option + def test_truncate_should_not_escape_input_if_safe_option assert_equal "Hello code!World!", :length => 12, :safe => true) assert_equal "Hello code!World!!", :length => 12, :safe => true) end - def test_truncate_should_not_sanitize_safe_input + def test_truncate_should_not_escape_safe_input assert_equal "Hello code!World!".html_safe, :length => 12) assert_equal "Hello code!World!!".html_safe, :length => 12) end @@ -138,21 +138,21 @@ class TextHelperTest < ActionView::TestCase assert_equal ' ', highlight(' ', 'blank text is returned verbatim') end - def test_highlight_should_sanitize_unsafe_input + def test_highlight_should_escape_unsafe_input assert_equal( "This is a beautiful morning<script>code!</script>", highlight("This is a beautiful morning", "beautiful") ) end - def test_highlight_should_not_sanitize_input_if_safe_option + def test_highlight_should_not_escape_input_if_safe_option assert_equal( "This is a beautiful morning", highlight("This is a beautiful morning", "beautiful", :safe => true) ) end - def test_highlight_should_not_sanitize_safe_input + def test_highlight_should_not_escape_safe_input assert_equal( "This is a beautiful morning", highlight("This is a beautiful morning".html_safe, "beautiful") -- cgit v1.2.3