Support redirecting by activity UUID in static FE as well.

This commit is contained in:
Phil Hagelberg 2019-11-12 17:33:54 -08:00
commit 3c60adbc1f
2 changed files with 44 additions and 11 deletions

View file

@ -143,6 +143,20 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
assert html_response(conn, 302) =~ "redirected"
end
test "redirect by activity ID", %{conn: conn} do
user = insert(:user)
{:ok, %Activity{data: %{"id" => id}}} =
CommonAPI.post(user, %{"status" => "I'm a doctor, not a devops!"})
conn =
conn
|> put_req_header("accept", "text/html")
|> get(URI.parse(id).path)
assert html_response(conn, 302) =~ "redirected"
end
test "404 when notice not found", %{conn: conn} do
conn =
conn