From 5a685dfa2a99ee61a898940812b289cb9f448fdc Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Thu, 6 Feb 2020 13:01:25 -0800 Subject: Sync tests: test sync roles command sync() should be called on the RoleSyncer. --- tests/bot/cogs/sync/test_cog.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3