Merge branch 'develop' into 'fix/mrf-sample-doc'
[akkoma] / test / web / static_fe / static_fe_controller_test.exs
index 6ea8cea3454e0d593364b6bf564be701921b4482..2ce8f9fa30e7516f0d4cb199112bba201da547d2 100644 (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