Add test for expiring mutes
This commit is contained in:
parent
c56e3d4f3b
commit
f6b250fb8d
1 changed files with 13 additions and 0 deletions
|
@ -963,6 +963,19 @@ test "it mutes people" 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