mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
Add test for expiring mutes
This commit is contained in:
parent
c56e3d4f3b
commit
f6b250fb8d
|
@ -963,6 +963,19 @@ defmodule Pleroma.UserTest do
|
|||
assert User.muted_notifications?(user, muted_user)
|
||||
end
|
||||
|
||||
test "expiring" do
|
||||
user = insert(:user)
|
||||
muted_user = insert(:user)
|
||||
|
||||
{:ok, _user_relationships} = User.mute(user, muted_user, %{expires_in: 60})
|
||||
assert User.mutes?(user, muted_user)
|
||||
|
||||
assert_enqueued(
|
||||
worker: Pleroma.Workers.MuteExpireWorker,
|
||||
args: %{"op" => "unmute", "muter" => user.id, "mutee" => muted_user.id}
|
||||
)
|
||||
end
|
||||
|
||||
test "it unmutes users" do
|
||||
user = insert(:user)
|
||||
muted_user = insert(:user)
|
||||
|
|
Loading…
Reference in a new issue