summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2023-06-02 15:41:40 +0000
committerfeld <feld@feld.me>2023-06-02 15:41:40 +0000
commit86b38dd14bece668e8fd4d244cbc8248aa96361f (patch)
treeeff0145d57fb490236a3d9c09ff03df87f0f99ca /test
parent2e45be2653f662f60e87fce56aa3c256e20bd1fb (diff)
parente8d35256653d196fd7c0daba8673a74dfe40a8e8 (diff)
downloadpleroma-86b38dd14bece668e8fd4d244cbc8248aa96361f.tar.gz
pleroma-86b38dd14bece668e8fd4d244cbc8248aa96361f.zip
Merge branch 'develop' into 'phoenix1.7'
# Conflicts: # mix.exs
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/media_proxy/media_proxy_controller_test.exs9
-rw-r--r--test/pleroma/web/plugs/uploaded_media_plug_test.exs7
2 files changed, 3 insertions, 13 deletions
diff --git a/test/pleroma/web/media_proxy/media_proxy_controller_test.exs b/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
index 019e389b7..deb407709 100644
--- a/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
+++ b/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
@@ -77,14 +77,9 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
with_mock Pleroma.ReverseProxy,
call: fn _conn, _url, _opts -> %Conn{status: :success} end do
- %{resp_headers: resp_headers, status: status} = get(conn, proxy_url)
+ conn = get(conn, proxy_url)
- assert status == 302
-
- assert Enum.any?(
- resp_headers,
- &(&1 == {"location", expected_url})
- )
+ assert redirected_to(conn, 302) == expected_url
end
end
diff --git a/test/pleroma/web/plugs/uploaded_media_plug_test.exs b/test/pleroma/web/plugs/uploaded_media_plug_test.exs
index fcc523cf4..dbf8ca5ec 100644
--- a/test/pleroma/web/plugs/uploaded_media_plug_test.exs
+++ b/test/pleroma/web/plugs/uploaded_media_plug_test.exs
@@ -64,11 +64,6 @@ defmodule Pleroma.Web.Plugs.UploadedMediaPlugTest do
|> Map.put(:scheme, new_media_scheme)
|> URI.to_string()
- assert conn.status == 302
-
- assert Enum.any?(
- conn.resp_headers,
- &(&1 == {"location", expected_url})
- )
+ assert redirected_to(conn, 302) == expected_url
end
end