Add test for expiring mutes
This commit is contained in:
parent
c56e3d4f3b
commit
f6b250fb8d
|
@ -963,6 +963,19 @@ test "it mutes people" do
|
||||||
assert User.muted_notifications?(user, muted_user)
|
assert User.muted_notifications?(user, muted_user)
|
||||||
end
|
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
|
test "it unmutes users" do
|
||||||
user = insert(:user)
|
user = insert(:user)
|
||||||
muted_user = insert(:user)
|
muted_user = insert(:user)
|
||||||
|
|
Loading…
Reference in New Issue