summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-01-29 11:39:06 +0100
committerlain <lain@soykaf.club>2020-01-29 11:39:06 +0100
commita802e07241e441189f85568ee9ca58508ab6d0d3 (patch)
treec6c4ace12ac31b53f5db99b5bb0d3e5527734dfd /test/web/mastodon_api
parentf1d5c0f07963c23d264311985c21837b9b03fd5a (diff)
downloadpleroma-a802e07241e441189f85568ee9ca58508ab6d0d3.tar.gz
pleroma-a802e07241e441189f85568ee9ca58508ab6d0d3.zip
Emoji Reactions: Add `reacted` field to emoji reactions
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs11
1 files changed, 9 insertions, 2 deletions
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