test/query/escape_test.rb in escape_utils-1.2.2 vs test/query/escape_test.rb in escape_utils-1.3.0

- old
+ new

@@ -23,25 +23,9 @@ assert_equal '%E3%81%BE%E3%81%A4%E3%82%82%E3%81%A8', EscapeUtils.escape_url(matz_name) matz_name_sep = "\xE3\x81\xBE\xE3\x81\xA4 \xE3\x82\x82\xE3\x81\xA8" # Matsu moto assert_equal '%E3%81%BE%E3%81%A4+%E3%82%82%E3%81%A8', EscapeUtils.escape_url(matz_name_sep) end - def test_input_must_be_utf8_or_ascii - str = "a space" - - str.force_encoding 'ISO-8859-1' - assert_raises Encoding::CompatibilityError do - EscapeUtils.escape_url(str) - end - - str.force_encoding 'UTF-8' - begin - EscapeUtils.escape_url(str) - rescue Encoding::CompatibilityError => e - assert_nil e, "#{e.class.name} raised, expected not to" - end - end - def test_return_value_is_tagged_as_utf8 str = "a+space" assert_equal Encoding.find('UTF-8'), EscapeUtils.escape_url(str).encoding end end