diff options
author | lain <lain@soykaf.club> | 2019-08-27 17:56:28 -0500 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-08-27 17:56:28 -0500 |
commit | b770ed1d9940230d4bd97113abdc220ca7d8eb1a (patch) | |
tree | fce2be56d6a3f8941f60f26f98d19fd52d982049 /test | |
parent | f017260cdc90d37c1878d7f2f29263dca017ebeb (diff) | |
download | pleroma-b770ed1d9940230d4bd97113abdc220ca7d8eb1a.tar.gz |
CommonAPI: Support emoji reactions.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index f28a66090..7cb1202fc 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -222,6 +222,20 @@ defmodule Pleroma.Web.CommonAPITest do end describe "reactions" do + test "reacting to a status with an emoji" do + user = insert(:user) + other_user = insert(:user) + + {:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"}) + + {:ok, reaction, _} = CommonAPI.react_with_emoji(activity.id, user, "👍") + + assert reaction.data["actor"] == user.ap_id + assert reaction.data["content"] == "👍" + + # TODO: test error case. + end + test "repeating a status" do user = insert(:user) other_user = insert(:user) |