aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/sync/test_base.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py
index 8eecea53f..f4ea33823 100644
--- a/tests/bot/cogs/sync/test_base.py
+++ b/tests/bot/cogs/sync/test_base.py
@@ -66,3 +66,14 @@ class SyncerBaseTests(unittest.TestCase):
ret_val = asyncio.run(self.syncer._send_prompt())
self.assertIsNone(ret_val)
+
+ def test_send_prompt_sends_new_message_if_not_given(self):
+ """A new message that mentions core devs should be sent if an extant message isn't given."""
+ mock_channel = helpers.MockTextChannel()
+ mock_channel.send.return_value = helpers.MockMessage()
+ self.bot.get_channel.return_value = mock_channel
+
+ asyncio.run(self.syncer._send_prompt())
+
+ mock_channel.send.assert_called_once()
+ self.assertIn(self.syncer._CORE_DEV_MENTION, mock_channel.send.call_args[0][0])