aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-05-12 14:58:46 -0400
committerGitHub <noreply@github.com>2017-05-12 14:58:46 -0400
commit276bfa7fc6efb0cea4408fe9f97b8741737b7549 (patch)
tree0c8f2613b1c4507905a57e3b580b4e0bb4e92aca /actionpack/test
parentb30760a4846d04bc48c787c95013208950906f5e (diff)
parent8607c25ba7810573733d9b37d0015154ba059f5e (diff)
downloadrails-276bfa7fc6efb0cea4408fe9f97b8741737b7549.tar.gz
rails-276bfa7fc6efb0cea4408fe9f97b8741737b7549.tar.bz2
rails-276bfa7fc6efb0cea4408fe9f97b8741737b7549.zip
Merge pull request #29062 from eileencodes/force-encoding-to-original-string-encoding
Maintain original encoding from path
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/journey/router/utils_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/journey/router/utils_test.rb b/actionpack/test/journey/router/utils_test.rb
index b77bf6628a..74277a4325 100644
--- a/actionpack/test/journey/router/utils_test.rb
+++ b/actionpack/test/journey/router/utils_test.rb
@@ -31,6 +31,11 @@ module ActionDispatch
def test_normalize_path_uppercase
assert_equal "/foo%AAbar%AAbaz", Utils.normalize_path("/foo%aabar%aabaz")
end
+
+ def test_normalize_path_maintains_string_encoding
+ path = "/foo%AAbar%AAbaz".b
+ assert_equal Encoding::ASCII_8BIT, Utils.normalize_path(path).encoding
+ end
end
end
end