From 0451c42e5cd03ab348235e0f43f78792c0bba481 Mon Sep 17 00:00:00 2001 From: Rohitt Vashishtha Date: Tue, 22 Jan 2019 19:17:10 +0530 Subject: [PATCH] minor: Add test for mentions using silent syntax inside quotes. --- zerver/tests/test_bugdown.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py index 207fa91634..a02b8dcfa3 100644 --- a/zerver/tests/test_bugdown.py +++ b/zerver/tests/test_bugdown.py @@ -1016,7 +1016,7 @@ class BugdownTest(ZulipTestCase): '

' % (hamlet.id, othello.id, hamlet.id, cordelia.id)) self.assertEqual(msg.mentions_user_ids, set([hamlet.id, cordelia.id])) - # Both fenced quote and > quote should be identical + # Both fenced quote and > quote should be identical for both silent and regular syntax. expected = ('
\n

' '@King Hamlet' '

\n
' % (hamlet.id)) @@ -1026,6 +1026,12 @@ class BugdownTest(ZulipTestCase): content = "> @**King Hamlet**" self.assertEqual(render_markdown(msg, content), expected) self.assertEqual(msg.mentions_user_ids, set()) + content = "```quote\n_@**King Hamlet**\n```" + self.assertEqual(render_markdown(msg, content), expected) + self.assertEqual(msg.mentions_user_ids, set()) + content = "> _@**King Hamlet**" + self.assertEqual(render_markdown(msg, content), expected) + self.assertEqual(msg.mentions_user_ids, set()) def test_mention_duplicate_full_name(self) -> None: realm = get_realm('zulip')