aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-05-23 10:46:08 +0300
committerGravatar ks129 <[email protected]>2020-06-11 08:59:41 +0300
commita9122b781191f93f5dd375b5c1d9e7744943b464 (patch)
tree96b28db29b1eee03ff88638418bee728afb47010
parentJam Tests: Created tests for case when too small amount of members given (diff)
Jam Tests: Created tests for removing duplicate team members
-rw-r--r--tests/bot/cogs/test_jams.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/bot/cogs/test_jams.py b/tests/bot/cogs/test_jams.py
index 3e71370c2..1cface1c1 100644
--- a/tests/bot/cogs/test_jams.py
+++ b/tests/bot/cogs/test_jams.py
@@ -28,3 +28,12 @@ class JamCreateTeamTests(unittest.IsolatedAsyncioTestCase):
)
self.ctx.send.assert_awaited_once()
utils_mock.get.assert_not_called()
+
+ @patch("bot.cogs.jams.utils")
+ async def test_duplicate_members_provided(self, utils_mock):
+ """Should `ctx.send` and exit early because duplicate members provided and total there is only 1 member."""
+ self.ctx.reset_mock()
+ member = MockMember()
+ await self.cog.createteam(self.cog, self.ctx, "foo", (member for _ in range(5)))
+ self.ctx.send.assert_awaited_once()
+ utils_mock.get.assert_not_called()