diff options
author | Mark Felder <feld@feld.me> | 2021-02-12 13:15:33 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-02-12 13:15:33 -0600 |
commit | fb2a8e7ccd6cfbfb9bc226998a083405fcebcbe0 (patch) | |
tree | 0ae9e547df912ccaec5230e882bd51ed9d62895c | |
parent | 3554a65f45d0e513e5e23e987f6f8fb1da5e8525 (diff) | |
download | pleroma-fb2a8e7ccd6cfbfb9bc226998a083405fcebcbe0.tar.gz |
Additional validation so we don't get caught off guard with a nil response
if CommonAPI ever prevents us from injecting this data
-rw-r--r-- | test/pleroma/web/activity_pub/transmogrifier_test.exs | 6 |
1 files 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 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 |