Also purge bio and display name

This commit is contained in:
Alex Gleason 2020-08-17 22:08:08 -05:00
parent d55faa2f8f
commit c12c576ee2
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 8 additions and 2 deletions

View file

@ -1591,7 +1591,9 @@ def purge_user_changeset(user) do
avatar: %{},
banner: %{},
background: %{},
fields: []
fields: [],
bio: nil,
name: nil
})
end

View file

@ -160,7 +160,9 @@ test "single user", %{admin: admin, conn: conn} 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 @@ test "single user", %{admin: admin, conn: conn} 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