Skip to content

Commit

Permalink
Add test for publish markdown with index
Browse files Browse the repository at this point in the history
  • Loading branch information
robtaylor committed Oct 3, 2024
1 parent 1041028 commit a0c2de0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doorstop/cli/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,14 @@ def test_publish_tree_no_path(self):
"""Verify 'doorstop publish' returns an error with no path."""
self.assertRaises(SystemExit, main, ["publish", "all"])

def test_publish_tree_markdown_with_index(self):
"""Verify 'doorstop publish' can create Markdown output for a tree,
with an index."""
path = os.path.join(self.temp, "all")
self.assertIs(None, main(["publish", "all", path, "--markdown", "--index"]))
self.assertTrue(os.path.isdir(path))
self.assertTrue(os.path.isfile(os.path.join(path, "index.md")))


class TestPublishCommand(TempTestCase):
"""Tests 'doorstop publish' options toc and template"""
Expand Down

0 comments on commit a0c2de0

Please sign in to comment.