Update test for custom profile fields
authorkPherox <admin@mail.kr-kp.com>
Sun, 25 Aug 2019 17:00:41 +0000 (02:00 +0900)
committerkPherox <admin@mail.kr-kp.com>
Sun, 25 Aug 2019 17:06:52 +0000 (02:06 +0900)
test/web/activity_pub/transmogrifier_test.exs

index 629c76c97c197a40979450d19ecd28388eca8011..0661d5d7cf94ea5aa830746be612ac3fb95e084e 100644 (file)
@@ -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