aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/utils/test_checks.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/bot/utils/test_checks.py b/tests/bot/utils/test_checks.py
index 22dc93073..19b758336 100644
--- a/tests/bot/utils/test_checks.py
+++ b/tests/bot/utils/test_checks.py
@@ -41,3 +41,11 @@ class ChecksTests(unittest.TestCase):
role_id = 42
self.ctx.author.roles.append(MockRole(role_id=role_id))
self.assertTrue(checks.without_role_check(self.ctx, role_id + 10))
+
+ def test_in_channel_check_for_correct_channel(self):
+ self.ctx.channel.id = 42
+ self.assertTrue(checks.in_channel_check(self.ctx, *[42]))
+
+ def test_in_channel_check_for_incorrect_channel(self):
+ self.ctx.channel.id = 42 + 10
+ self.assertFalse(checks.in_channel_check(self.ctx, *[42]))