Also purge bio and display name
authorAlex Gleason <alex@alexgleason.me>
Tue, 18 Aug 2020 03:08:08 +0000 (22:08 -0500)
committerAlex Gleason <alex@alexgleason.me>
Tue, 18 Aug 2020 03:11:45 +0000 (22:11 -0500)
lib/pleroma/user.ex
test/web/admin_api/controllers/admin_api_controller_test.exs

index a8bdcdad70c8944ed5c0f3f69d9b8f9103ff69f3..1a7d25801eddf9c5880915777d4b08b96c250219 100644 (file)
@@ -1591,7 +1591,9 @@ defmodule Pleroma.User do
       avatar: %{},
       banner: %{},
       background: %{},
-      fields: []
+      fields: [],
+      bio: nil,
+      name: nil
     })
   end
 
index f23d23e05b03d42b715e6f174684a1e056707ff1..2eb698807118ab78f3b6464458c79a3823c56cf8 100644 (file)
@@ -160,7 +160,9 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
       user =
         insert(:user,
           avatar: %{"url" => [%{"href" => "https://someurl"}]},
-          banner: %{"url" => [%{"href" => "https://somebanner"}]}
+          banner: %{"url" => [%{"href" => "https://somebanner"}]},
+          bio: "Hello world!",
+          name: "A guy"
         )
 
       # Create some activities to check they got deleted later
@@ -201,6 +203,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
         assert user.note_count == 0
         assert user.follower_count == 0
         assert user.following_count == 0
+        assert user.bio == nil
+        assert user.name == nil
 
         assert called(Pleroma.Web.Federator.publish(:_))
       end