test: transmogrifier: add test proving that transmogrifier can handle outgoing listens
authorAriadne Conill <ariadne@dereferenced.org>
Sat, 28 Sep 2019 11:57:24 +0000 (11:57 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Mon, 30 Sep 2019 10:39:48 +0000 (10:39 +0000)
test/web/activity_pub/transmogrifier_test.exs

index 9040c87ca2c36cb1b826b49851d7ce0a908d7996..f77311b3c3324d9fad491a23138a240e8b761874 100644 (file)
@@ -1219,6 +1219,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
 
       assert is_nil(modified["bcc"])
     end
+
+    test "it can handle Listen activities" do
+      listen_activity = insert(:listen)
+
+      {:ok, modified} = Transmogrifier.prepare_outgoing(listen_activity.data)
+
+      assert modified["type"] == "Listen"
+    end
   end
 
   describe "user upgrade" do