Additional validation so we don't get caught off guard with a nil response

if CommonAPI ever prevents us from injecting this data
This commit is contained in:
Mark Felder 2021-02-12 13:15:33 -06:00
parent 3554a65f45
commit fb2a8e7ccd
1 changed files with 6 additions and 0 deletions

View File

@ -208,6 +208,12 @@ test "it strips internal fields" 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