X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Ffallback_test.exs;h=3919ef93a35db61b212e48d423e5e62fbbedc1f6;hb=f92c447bbc38db417beb2ac505c17649c6de01d2;hp=514923a20009f9023ff5c74ce540a97209a11bd3;hpb=a13d449b241b6e5fa14fb741694e63cd21569b2c;p=akkoma diff --git a/test/web/fallback_test.exs b/test/web/fallback_test.exs index 514923a20..3919ef93a 100644 --- a/test/web/fallback_test.exs +++ b/test/web/fallback_test.exs @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors +# Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.FallbackTest do @@ -24,6 +24,16 @@ defmodule Pleroma.Web.FallbackTest do |> html_response(200) =~ "" 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")