CommonAPI: Support emoji reactions.
This commit is contained in:
parent
f017260cdc
commit
b770ed1d99
2 changed files with 24 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue