mirror of https://github.com/zulip/zulip.git
minor: Add test for mentions using silent syntax inside quotes.
This commit is contained in:
parent
8aee6a1dd7
commit
0451c42e5c
|
@ -1016,7 +1016,7 @@ class BugdownTest(ZulipTestCase):
|
|||
'</p>' % (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 = ('<blockquote>\n<p>'
|
||||
'<span class="user-mention silent" data-user-id="%s">@King Hamlet</span>'
|
||||
'</p>\n</blockquote>' % (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')
|
||||
|
|
Loading…
Reference in New Issue