logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: c49dece0ddf7f6704afde2e1fc969537e423a455
parent 404e09126076dcbd895fb2d17f872c553cc31249
Author: Mark Felder <feld@feld.me>
Date:   Wed, 30 Jul 2025 15:13:43 -0700

Update test to also cover query encoding

Diffstat:

Mtest/pleroma/http_test.exs6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/pleroma/http_test.exs b/test/pleroma/http_test.exs @@ -26,7 +26,7 @@ defmodule Pleroma.HTTPTest do %{method: :post, url: "http://example.com/world"} -> %Tesla.Env{status: 200, body: "world"} - %{method: :get, url: "https://tsundere.love/emoji/Pack%201/koronebless.png"} -> + %{method: :get, url: "https://tsundere.love/emoji/Pack%201/koronebless.png?foo=bar+baz"} -> %Tesla.Env{status: 200, body: "emoji data"} end) @@ -74,13 +74,13 @@ defmodule Pleroma.HTTPTest do test "URL encoding properly encodes URLs with spaces" do clear_config(:test_url_encoding, true) - url_with_space = "https://tsundere.love/emoji/Pack 1/koronebless.png" + url_with_space = "https://tsundere.love/emoji/Pack 1/koronebless.png?foo=bar baz" result = HTTP.get(url_with_space) assert result == {:ok, %Tesla.Env{status: 200, body: "emoji data"}} - properly_encoded_url = "https://tsundere.love/emoji/Pack%201/koronebless.png" + properly_encoded_url = "https://tsundere.love/emoji/Pack%201/koronebless.png?foo=bar+baz" result = HTTP.get(properly_encoded_url)