[#1560] Ensured authentication or enabled federation for federation-related routes. New tests + tests refactoring.

This commit is contained in:
Ivan Tashkinov 2020-03-09 20:51:44 +03:00
commit 5fc92deef3
12 changed files with 418 additions and 404 deletions

View file

@ -52,9 +52,8 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
url = Pleroma.Web.MediaProxy.encode_url("https://google.fn/test.png")
invalid_url = String.replace(url, "test.png", "test-file.png")
response = get(conn, invalid_url)
html = "<html><body>You are being <a href=\"#{url}\">redirected</a>.</body></html>"
assert response.status == 302
assert response.resp_body == html
assert redirected_to(response) == url
end
test "it performs ReverseProxy.call when signature valid", %{conn: conn} do