From 8d3b29aaba1a1879c9495ae15178b6e16ffc5faf Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Wed, 4 Jan 2023 21:13:51 +0300 Subject: Allow custom emoji reactions: add test for mixed emoji react, fix credo errors --- .../controllers/emoji_reaction_controller_test.exs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs index 6af68cb52..d81b47a6b 100644 --- a/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs +++ b/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs @@ -76,7 +76,12 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do note = insert(:note, user: user, - data: %{"reactions" => [["wow", [other_user.ap_id], "https://remote/emoji/wow"]]} + data: %{ + "reactions" => [ + ["👍", [other_user.ap_id], nil], + ["wow", [other_user.ap_id], "https://remote/emoji/wow"] + ] + } ) activity = insert(:note_activity, note: note, user: user) @@ -89,6 +94,13 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do |> json_response(200) assert result["pleroma"]["emoji_reactions"] == [ + %{ + "account_ids" => [other_user.id], + "count" => 1, + "me" => false, + "name" => "👍", + "url" => nil + }, %{ "name" => "wow@remote", "count" => 2, -- cgit v1.2.3