summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-01-30 13:16:04 +0000
committerrinpatch <rinpatch@sdf.org>2020-01-30 13:16:04 +0000
commit263abe3ba5c4b42edd2b2fc2b53d5b1f31fade5a (patch)
treecba301152b93fad2548d393d29589d37dabc40e2 /test/web/mastodon_api
parent946de2299cccebac6718e3a132397ff5c06c67ee (diff)
parentb3a877d6c9f7645c854527fc5bf05d9161c2480b (diff)
downloadpleroma-263abe3ba5c4b42edd2b2fc2b53d5b1f31fade5a.tar.gz
pleroma-263abe3ba5c4b42edd2b2fc2b53d5b1f31fade5a.zip
Merge branch 'emoji-reactions-reacted' into 'develop'
Emoji reactions: Add `reacted` field See merge request pleroma/pleroma!2160
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