add more test cases for link formatting
This commit is contained in:
parent
5291308677
commit
aa946e3ab7
|
@ -303,6 +303,21 @@ class StatusViews(TestCase):
|
||||||
'<a href="%s">openlibrary.org/search'
|
'<a href="%s">openlibrary.org/search'
|
||||||
"?q=arkady+strugatsky&mode=everything</a>" % url,
|
"?q=arkady+strugatsky&mode=everything</a>" % url,
|
||||||
)
|
)
|
||||||
|
url = "https://tech.lgbt/@bookwyrm"
|
||||||
|
self.assertEqual(
|
||||||
|
views.status.format_links(url),
|
||||||
|
'<a href="%s">tech.lgbt/@bookwyrm</a>' % url
|
||||||
|
)
|
||||||
|
url = "users.speakeasy.net/~lion/nb/book.pdf"
|
||||||
|
self.assertEqual(
|
||||||
|
views.status.format_links(url),
|
||||||
|
'<a href="%s">users.speakeasy.net/~lion/nb/book.pdf</a>' % url
|
||||||
|
)
|
||||||
|
url = "pkm.one/#/page/The%20Book%20which%20launched%20a%201000%20Note%20taking%20apps"
|
||||||
|
self.assertEqual(
|
||||||
|
views.status.format_links(url),
|
||||||
|
'<a href="%s">%s</a>' % (url, url)
|
||||||
|
)
|
||||||
|
|
||||||
def test_to_markdown(self, *_):
|
def test_to_markdown(self, *_):
|
||||||
"""this is mostly handled in other places, but nonetheless"""
|
"""this is mostly handled in other places, but nonetheless"""
|
||||||
|
|
Loading…
Reference in New Issue