Better error handling for MastodonApiController.
This commit is contained in:
parent
0f70e83e8c
commit
4856ba596f
2 changed files with 24 additions and 4 deletions
|
|
@ -505,6 +505,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
|||
|
||||
assert to_string(activity.id) == id
|
||||
end
|
||||
|
||||
test "returns 500 for a wrong id", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
||||
resp =
|
||||
conn
|
||||
|> assign(:user, user)
|
||||
|> post("/api/v1/statuses/1/favourite")
|
||||
|> json_response(500)
|
||||
|
||||
assert resp == "Something went wrong"
|
||||
end
|
||||
end
|
||||
|
||||
describe "unfavoriting" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue