diff test/test_templating.py @ 6564:21c7c2041a4b

issue2551181 - allow issueXXX#fragment to generate a link with fragment There is another ticket to add id's to elements displaying messages in issue.item.html. This change allows a fast way to link to such an element in a long issue with many messages once that other issue is committed and merged into a tracker template.
author John Rouillard <rouilj@ieee.org>
date Wed, 15 Dec 2021 23:52:25 -0500
parents f1f8d75edd97
children 5b71a50e833b
line wrap: on
line diff
--- a/test/test_templating.py	Tue Dec 14 08:55:55 2021 -0500
+++ b/test/test_templating.py	Wed Dec 15 23:52:25 2021 -0500
@@ -450,6 +450,9 @@
         p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '')
         def t(s): return p.hyper_re.sub(p._hyper_repl, s)
         ae = self.assertEqual
+        ae(t('issue5#msg10'), '<a href="issue5#msg10">issue5#msg10</a>')
+        ae(t('issue5'), '<a href="issue5">issue5</a>')
+        ae(t('issue2255'), 'issue2255')
         ae(t('foo https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4 bar'),
            'foo <a href="https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4" rel="nofollow noopener">'
            'https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4</a> bar')

Roundup Issue Tracker: http://roundup-tracker.org/