summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-01-21 19:45:13 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-01-21 19:45:13 +0300
commit22e94bb2c7a4de93a741b7ca45148cee4a0d601a (patch)
treec1e388a0d21ff768d8b53bc53662d96cbc3d2ae1 /test/web/mastodon_api/controllers/status_controller_test.exs
parentcde828ff7df64740f36b2fc9dfdbfc8d76a8a78d (diff)
parent04c9ca5d68eb4d9c8abc82a91d5df3c483089b9b (diff)
downloadpleroma-22e94bb2c7a4de93a741b7ca45148cee4a0d601a.tar.gz
pleroma-22e94bb2c7a4de93a741b7ca45148cee4a0d601a.zip
Merge branch 'develop' into fix/attachments-cleanup
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/status_controller_test.exs7
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")