From a0c2de04222f852e90fee2c3635db8237b76612d Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Wed, 2 Oct 2024 22:49:06 -0400 Subject: [PATCH] Add test for publish markdown with index --- doorstop/cli/tests/test_all.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doorstop/cli/tests/test_all.py b/doorstop/cli/tests/test_all.py index 62f26571..e2059da1 100644 --- a/doorstop/cli/tests/test_all.py +++ b/doorstop/cli/tests/test_all.py @@ -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"""