mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 02:49:18 +00:00
Add test for User.mutes and so on.
This commit is contained in:
parent
9ae79bb71a
commit
4196d9af11
|
@ -594,6 +594,29 @@ test "it imports user followings from list" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "mutes" do
|
||||
test "it mutes people" do
|
||||
user = insert(:user)
|
||||
muted_user = insert(:user)
|
||||
|
||||
refute User.mutes?(user, muted_user)
|
||||
|
||||
{:ok, user} = User.mute(user, muted_user)
|
||||
|
||||
assert User.mutes?(user, muted_user)
|
||||
end
|
||||
|
||||
test "it unmutes users" do
|
||||
user = insert(:user)
|
||||
muted_user = insert(:user)
|
||||
|
||||
{:ok, user} = User.mute(user, muted_user)
|
||||
{:ok, user} = User.unmute(user, muted_user)
|
||||
|
||||
refute User.mutes?(user, muted_user)
|
||||
end
|
||||
end
|
||||
|
||||
describe "blocks" do
|
||||
test "it blocks people" do
|
||||
user = insert(:user)
|
||||
|
|
Loading…
Reference in a new issue