Pleroma.Constants: Fix typo.
[akkoma] / test / web / common_api / common_api_test.exs
index 0f4a5eb25bb251d7029b8abf61dcd6bb1889c17d..011fcfca95b9f432175bd20314240574629d8e72 100644 (file)
@@ -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)