diff options
author | lain <lain@soykaf.club> | 2019-09-30 16:38:19 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-30 16:38:19 +0200 |
commit | 19bc0b8c79765dc485e081651a4e4c589d18b970 (patch) | |
tree | 3a5f6851ac6d88db68cae8aab17249a705718a01 /test/web/pleroma_api | |
parent | 08256e9299494c0bcd1a295c6079263277b21ba7 (diff) | |
download | pleroma-19bc0b8c79765dc485e081651a4e4c589d18b970.tar.gz |
.
Diffstat (limited to 'test/web/pleroma_api')
-rw-r--r-- | test/web/pleroma_api/pleroma_api_controller_test.exs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/pleroma_api/pleroma_api_controller_test.exs b/test/web/pleroma_api/pleroma_api_controller_test.exs index 3c2a087ca..82d23ea5b 100644 --- a/test/web/pleroma_api/pleroma_api_controller_test.exs +++ b/test/web/pleroma_api/pleroma_api_controller_test.exs @@ -27,6 +27,22 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do assert to_string(activity.id) == id end + test "POST /api/v1/pleroma/statuses/:id/unreact_with_emoji", %{conn: conn} do + user = insert(:user) + other_user = insert(:user) + + {:ok, activity} = CommonAPI.post(user, %{"status" => "#cofe"}) + {:ok, activity, _object} = CommonAPI.react_with_emoji(activity.id, other_user, "☕") + + result = + conn + |> assign(:user, other_user) + |> post("/api/v1/pleroma/statuses/#{activity.id}/unreact_with_emoji", %{"emoji" => "☕"}) + + assert %{"id" => id} = json_response(result, 200) + assert to_string(activity.id) == id + end + test "GET /api/v1/pleroma/statuses/:id/emoji_reactions_by", %{conn: conn} do user = insert(:user) other_user = insert(:user) |