From: Mark Felder Date: Fri, 12 Feb 2021 19:15:33 +0000 (-0600) Subject: Additional validation so we don't get caught off guard with a nil response X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fb2a8e7ccd6cfbfb9bc226998a083405fcebcbe0;p=akkoma Additional validation so we don't get caught off guard with a nil response if CommonAPI ever prevents us from injecting this data --- diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs index 2c99875ff..33ccbe2a7 100644 --- 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