From 879184fe37f2bb631bafe632530ab05e3760dba2 Mon Sep 17 00:00:00 2001 From: Alberto Grespan Date: Tue, 20 May 2014 17:04:00 -0430 Subject: [PATCH] Update unescaped string test Nothing was being tested without explicitly making the string encoding ASCII. --- test/test_post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_post.rb b/test/test_post.rb index 46d1fa7e..17f937f1 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -107,7 +107,7 @@ class TestPost < Test::Unit::TestCase end should "return a UTF-8 unescaped string" do - assert_equal Encoding::UTF_8, URL.unescape_path("/rails%E7%AC%94%E8%AE%B0/2014/04/20/escaped/").encoding + assert_equal Encoding::UTF_8, URL.unescape_path("/rails%E7%AC%94%E8%AE%B0/2014/04/20/escaped/".encode(Encoding::ASCII)).encoding end should "respect permalink in yaml front matter" do