aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-01-05 09:41:28 -0800
committerGravatar MarkKoz <[email protected]>2020-02-12 10:07:50 -0800
commit113029aae7625118ac1a5491652f3960172a3605 (patch)
tree23b63c7172f0989e9776c377d08d0c1d445cb7af /tests
parentSync tests: create a Syncer subclass for testing (diff)
Sync tests: test that _send_prompt edits message contents
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/sync/test_base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py
index d38c90410..048d6c533 100644
--- a/tests/bot/cogs/sync/test_base.py
+++ b/tests/bot/cogs/sync/test_base.py
@@ -1,3 +1,4 @@
+import asyncio
import unittest
from bot.cogs.sync.syncers import Syncer
@@ -24,3 +25,10 @@ class SyncerBaseTests(unittest.TestCase):
with self.assertRaisesRegex(TypeError, "Can't instantiate abstract class"):
Syncer(self.bot)
+ def test_send_prompt_edits_message_content(self):
+ """The contents of the given message should be edited to display the prompt."""
+ msg = helpers.MockMessage()
+ asyncio.run(self.syncer._send_prompt(msg))
+
+ msg.edit.assert_called_once()
+ self.assertIn("content", msg.edit.call_args[1])