commit: fb2a8e7ccd6cfbfb9bc226998a083405fcebcbe0
parent 3554a65f45d0e513e5e23e987f6f8fb1da5e8525
Author: Mark Felder <feld@feld.me>
Date: Fri, 12 Feb 2021 13:15:33 -0600
Additional validation so we don't get caught off guard with a nil response
if CommonAPI ever prevents us from injecting this data
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs
@@ -208,6 +208,12 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
application: %{name: "TestClient", website: "https://pleroma.social"}
})
+ # Ensure injected application data made it into the activity
+ # as we don't have a Token to derive it from, otherwise it will
+ # be nil and the test will pass
+ assert %{"application" => %{name: "TestClient", website: "https://pleroma.social"}} =
+ activity.object.data
+
{:ok, modified} = Transmogrifier.prepare_outgoing(activity.data)
assert length(modified["object"]["tag"]) == 2