aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-10-11 13:13:23 +0300
committerGravatar ks129 <[email protected]>2020-10-11 13:13:23 +0300
commit2b701b05b55d6c62c27497d39b142370693ef88d (patch)
tree71534a8afaa8bfb2822a138c2cff10b3cdbf1b0b /tests
parentCreate test for temporary voice ban (diff)
Create test for voice unban
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/moderation/infraction/test_infractions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/bot/exts/moderation/infraction/test_infractions.py b/tests/bot/exts/moderation/infraction/test_infractions.py
index 814959775..02062932e 100644
--- a/tests/bot/exts/moderation/infraction/test_infractions.py
+++ b/tests/bot/exts/moderation/infraction/test_infractions.py
@@ -76,3 +76,9 @@ class VoiceBanTests(unittest.IsolatedAsyncioTestCase):
self.cog.apply_voice_ban = AsyncMock()
self.assertIsNone(await self.cog.tempvoiceban(self.cog, self.ctx, self.user, "baz", reason="foobar"))
self.cog.apply_voice_ban.assert_awaited_once_with(self.ctx, self.user, "foobar", expires_at="baz")
+
+ async def test_voice_unban(self):
+ """Should call infraction pardoning function."""
+ self.cog.pardon_infraction = AsyncMock()
+ self.assertIsNone(await self.cog.unvoiceban(self.cog, self.ctx, self.user))
+ self.cog.pardon_infraction.assert_awaited_once_with(self.ctx, "voice_ban", self.user)