update test

This commit is contained in:
Maksim Pechnikov 2020-11-13 15:30:37 +03:00 committed by Alexander Strizhakov
parent a09fae8820
commit 32c5909686
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381

View File

@ -1610,8 +1610,6 @@ defmodule Pleroma.UserTest do
end
test "delete/1 purges a user when they wouldn't be fully deleted" do
_tag = insert(:tag, name: "verify")
user =
insert(:user, %{
bio: "eyy lmao",
@ -1620,7 +1618,7 @@ defmodule Pleroma.UserTest do
keys: "RSA begin buplic key",
public_key: "--PRIVATE KEYE--",
avatar: %{"a" => "b"},
# tags: ["qqqqq"],
tags: [build(:tag, name: "verify")],
banner: %{"a" => "b"},
background: %{"a" => "b"},
note_count: 9,
@ -1647,7 +1645,6 @@ defmodule Pleroma.UserTest do
also_known_as: ["https://lol.olo/users/loll"]
})
user = User.tag(user, "verify")
assert Enum.map(user.tags, & &1.name) == ["verify"]
assert Repo.aggregate(from(ut in "users_tags"), :count, :user_id) == 1
{:ok, job} = User.delete(user)