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