Merge branch 'backport/1.1-hackney-and-outbox-fixes' into 'maint/1.1'
[akkoma] / test / web / activity_pub / transmogrifier_test.exs
index 629c76c97c197a40979450d19ecd28388eca8011..bebecce8db941d5f0cf355e17f3ed93d36557031 100644 (file)
@@ -102,7 +102,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
 
       assert capture_log(fn ->
                {:ok, _returned_activity} = Transmogrifier.handle_incoming(data)
-             end) =~ "[error] Couldn't fetch \"\"https://404.site/whatever\"\", error: nil"
+             end) =~ "[error] Couldn't fetch \"https://404.site/whatever\", error: nil"
     end
 
     test "it works for incoming notices" do
@@ -563,6 +563,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
                %{"name" => "foo", "value" => "updated"},
                %{"name" => "foo1", "value" => "updated"}
              ]
+
+      update_data = put_in(update_data, ["object", "attachment"], [])
+
+      {:ok, _} = Transmogrifier.handle_incoming(update_data)
+
+      user = User.get_cached_by_ap_id(user.ap_id)
+
+      assert User.Info.fields(user.info) == []
     end
 
     test "it works for incoming update activities which lock the account" do