summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhil Hagelberg <phil@hagelb.org>2019-11-12 17:33:54 -0800
committerPhil Hagelberg <phil@hagelb.org>2019-11-13 08:22:11 -0800
commit3c60adbc1f773c732458d68b4becaf9bb36d7062 (patch)
treef4ea2ac9c1477e701fe75040bafcd0e13e8671d7 /test
parent0867cb083eb469ae10cd48d424a51efb2fae4018 (diff)
downloadpleroma-3c60adbc1f773c732458d68b4becaf9bb36d7062.tar.gz
pleroma-3c60adbc1f773c732458d68b4becaf9bb36d7062.zip
Support redirecting by activity UUID in static FE as well.
Diffstat (limited to 'test')
-rw-r--r--test/web/static_fe/static_fe_controller_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/static_fe/static_fe_controller_test.exs b/test/web/static_fe/static_fe_controller_test.exs
index 6ea8cea34..2ce8f9fa3 100644
--- a/test/web/static_fe/static_fe_controller_test.exs
+++ b/test/web/static_fe/static_fe_controller_test.exs
@@ -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