Added tests for the wikilinks plugin.
2 files changed, 12 insertions(+), 1 deletions(-) M src/wiki/plugins/macros/mdx/wikilinks.py A tests/plugins/macros/test_links.py
M src/wiki/plugins/macros/mdx/wikilinks.py => src/wiki/plugins/macros/mdx/wikilinks.py +0 -1
A tests/plugins/macros/test_links.py => tests/plugins/macros/test_links.py +12 -0
@@ 0,0 1,12 @@ from tests.base import RequireRootArticleMixin, TestBase from wiki.core import markdown from wiki.plugins.macros.mdx.wikilinks import WikiLinkExtension class WikiLinksTests(RequireRootArticleMixin, TestBase): def test_wikilink(self): md = markdown.ArticleMarkdown(article=self.root_article, extensions=[WikiLinkExtension()]) md_text = md.convert('[[Root Article]]') self.assertEqual( md_text, '<p><a class="wiki_wikilink" href="/Root_Article/">Root Article</a></p>' )