aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-03-11 15:26:03 +0100
committerGravatar Numerlor <[email protected]>2020-03-11 15:26:03 +0100
commitcb9397ba9ef311917629c8904087c1b3c38cc2d3 (patch)
tree377f3562f17479873f93b6557238c35966674d3b /tests
parentAdd test for `cog_unload`. (diff)
Add test for `cog_check`.
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/moderation/test_silence.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index fc2600f5c..eaf897d1d 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -140,3 +140,10 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
"""No task created with no channels."""
self.cog.cog_unload()
asyncio_mock.create_task.assert_not_called()
+
+ @mock.patch("bot.cogs.moderation.silence.with_role_check")
+ @mock.patch("bot.cogs.moderation.silence.MODERATION_ROLES", new=(1, 2, 3))
+ def test_cog_check(self, role_check):
+ """Role check is called with `MODERATION_ROLES`"""
+ self.cog.cog_check(self.ctx)
+ role_check.assert_called_once_with(self.ctx, *(1, 2, 3))