Merge remote-tracking branch 'pleroma/develop' into manifest
[akkoma] / test / pleroma / web / plugs / frontend_static_plug_test.exs
index c8cfc967c1db2344022ee8679b8e83b2e32fbb0f..93d0ab469a22b9c320c451d276b066e27066e4c6 100644 (file)
@@ -74,4 +74,33 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
       assert %Plug.Conn{status: :success} = get(conn, url)
     end
   end
+
+  test "api routes are detected correctly" do
+    # If this test fails we have probably added something
+    # new that should be in /api/ instead
+    expected_routes = [
+      "api",
+      "main",
+      "ostatus_subscribe",
+      "oauth",
+      "objects",
+      "activities",
+      "notice",
+      "users",
+      "tags",
+      "mailer",
+      "inbox",
+      "relay",
+      "internal",
+      ".well-known",
+      "nodeinfo",
+      "manifest.json",
+      "proxy",
+      "test",
+      "user_exists",
+      "check_password"
+    ]
+
+    assert expected_routes == Pleroma.Web.Router.get_api_routes()
+  end
 end