Merge remote-tracking branch 'origin/develop' into global-status-expiration
[akkoma] / test / web / fallback_test.exs
index 514923a20009f9023ff5c74ce540a97209a11bd3..3919ef93a35db61b212e48d423e5e62fbbedc1f6 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.FallbackTest do
@@ -24,6 +24,16 @@ defmodule Pleroma.Web.FallbackTest do
            |> html_response(200) =~ "<!--server-generated-meta-->"
   end
 
+  test "GET /api*path", %{conn: conn} do
+    assert conn
+           |> get("/api/foo")
+           |> json_response(404) == %{"error" => "Not implemented"}
+  end
+
+  test "GET /pleroma/admin -> /pleroma/admin/", %{conn: conn} do
+    assert redirected_to(get(conn, "/pleroma/admin")) =~ "/pleroma/admin/"
+  end
+
   test "GET /*path", %{conn: conn} do
     assert conn
            |> get("/foo")