diff options
author | rinpatch <rinpatch@sdf.org> | 2020-01-20 16:31:43 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-01-20 16:31:43 +0000 |
commit | 00d08c9231abfebc872b669cd8b1f7a02cbb0175 (patch) | |
tree | 2d4da7a060b52b02e4f5c083b9456f695c5da660 /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | 6a716e3fe5290df80af72e3ad5e45ee3afb581a8 (diff) | |
parent | 7518f3877f9fb7c62c05292246e4ba82927cb09a (diff) | |
download | pleroma-00d08c9231abfebc872b669cd8b1f7a02cbb0175.tar.gz pleroma-00d08c9231abfebc872b669cd8b1f7a02cbb0175.zip |
Merge branch 'favoritng-responses' into 'develop'
Mastodon API: Align favoriting / repeating behavior with Mastodon
See merge request pleroma/pleroma!2119
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/status_controller_test.exs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs index 307221c5d..b03b4b344 100644 --- a/test/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/web/mastodon_api/controllers/status_controller_test.exs @@ -638,6 +638,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do assert to_string(activity.id) == id end + test "favoriting twice will just return 200", %{conn: conn} do + activity = insert(:note_activity) + + post(conn, "/api/v1/statuses/#{activity.id}/favourite") + assert post(conn, "/api/v1/statuses/#{activity.id}/favourite") |> json_response(200) + end + test "returns 400 error for a wrong id", %{conn: conn} do conn = post(conn, "/api/v1/statuses/1/favourite") |