CommonAPI: Add unreactions.

This commit is contained in:
lain 2019-10-02 15:38:57 +02:00
commit 9cfe9a57c5
3 changed files with 26 additions and 1 deletions

View file

@ -243,7 +243,10 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
{:ok, reaction, _} = CommonAPI.react_with_emoji(activity.id, user, "👍")
assert false
{:ok, unreaction, _} = CommonAPI.unreact_with_emoji(activity.id, user, "👍")
assert unreaction.data["type"] == "Undo"
assert unreaction.data["object"] == reaction.data["id"]
end
test "repeating a status" do