Respond with a 404 Not implemented JSON error message
when requested API is not implemented
This commit is contained in:
parent
a13d449b24
commit
3ab9255eda
3 changed files with 14 additions and 0 deletions
|
|
@ -24,6 +24,12 @@ 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 /*path", %{conn: conn} do
|
||||
assert conn
|
||||
|> get("/foo")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue