aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2019-09-27 11:40:40 +0000
committerAriadne Conill <ariadne@dereferenced.org>2019-09-30 10:39:17 +0000
commitb7877e9b1c61e42d60bb65deef0cec7f1103dd89 (patch)
tree68b56a910db892bdfe3081b3a5dd252c4eca15ad /test
parentc3d09921e4dd13f02ab141bba9ba8372f70bab76 (diff)
downloadpleroma-b7877e9b1c61e42d60bb65deef0cec7f1103dd89.tar.gz
mastodon api: implement rendering of listen activities
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index c17d0ef95..683132f8d 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -608,4 +608,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert status.visibility == "list"
end
+
+ test "successfully renders a Listen activity (pleroma extension)" do
+ listen_activity = insert(:listen)
+
+ status = StatusView.render("listen.json", activity: listen_activity)
+
+ assert status.length == listen_activity.data["object"]["length"]
+ assert status.title == listen_activity.data["object"]["title"]
+ end
end