summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 2abcf0dfe..1291c3693 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -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