From a802e07241e441189f85568ee9ca58508ab6d0d3 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 29 Jan 2020 11:39:06 +0100 Subject: Emoji Reactions: Add `reacted` field to emoji reactions --- test/web/mastodon_api/views/status_view_test.exs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/web/mastodon_api') diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 25777b011..fc110417c 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -37,8 +37,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do status = StatusView.render("show.json", activity: activity) assert status[:pleroma][:emoji_reactions] == [ - %{emoji: "☕", count: 2}, - %{emoji: "🍵", count: 1} + %{emoji: "☕", count: 2, reacted: false}, + %{emoji: "🍵", count: 1, reacted: false} + ] + + status = StatusView.render("show.json", activity: activity, for: user) + + assert status[:pleroma][:emoji_reactions] == [ + %{emoji: "☕", count: 2, reacted: true}, + %{emoji: "🍵", count: 1, reacted: false} ] end -- cgit v1.2.3