aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-06 13:01:25 -0800
committerGravatar MarkKoz <[email protected]>2020-02-12 10:07:57 -0800
commit5a685dfa2a99ee61a898940812b289cb9f448fdc (patch)
tree12cf8c9f3c086e5230cb672dc6f6e712617b0b79 /tests
parentSync tests: test Sync cog's on_user_update (diff)
Sync tests: test sync roles command
sync() should be called on the RoleSyncer.
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/sync/test_cog.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/bot/cogs/sync/test_cog.py b/tests/bot/cogs/sync/test_cog.py
index 88c5e00b9..4de058965 100644
--- a/tests/bot/cogs/sync/test_cog.py
+++ b/tests/bot/cogs/sync/test_cog.py
@@ -285,3 +285,12 @@ class SyncCogListenerTests(SyncCogTestCase):
self.assertEqual(updated_information[api_field], api_value)
else:
self.cog.patch_user.assert_not_called()
+
+
+class SyncCogCommandTests(SyncCogTestCase):
+ def test_sync_roles_command(self):
+ """sync() should be called on the RoleSyncer."""
+ ctx = helpers.MockContext()
+ asyncio.run(self.cog.sync_roles_command.callback(self.cog, ctx))
+
+ self.cog.role_syncer.sync.assert_called_once_with(ctx.guild, ctx)