Add test for URLs with Unicode characters too
authorMark Felder <feld@FreeBSD.org>
Tue, 9 Jul 2019 15:55:36 +0000 (10:55 -0500)
committerMark Felder <feld@FreeBSD.org>
Tue, 9 Jul 2019 15:55:36 +0000 (10:55 -0500)
test/media_proxy_test.exs

index 13922fe4ae3f4ef433b1695f5f94eeb6b915cb6c..1d6d170b72e02d4986ad087fb3a090c7cb59a391 100644 (file)
@@ -156,6 +156,13 @@ defmodule Pleroma.MediaProxyTest do
       assert decode_result(encoded) == url
     end
 
+    test "preserve unicode characters" do
+      url = "https://ko.wikipedia.org/wiki/위키백과:대문"
+
+      encoded = url(url)
+      assert decode_result(encoded) == url
+    end
+
     test "does not change whitelisted urls" do
       upload_config = Pleroma.Config.get([Pleroma.Upload])
       media_url = "https://media.pleroma.social"