diff --git a/tests/test_drafts.py b/tests/test_drafts.py index f7f0618..b809d77 100644 --- a/tests/test_drafts.py +++ b/tests/test_drafts.py @@ -83,3 +83,13 @@ def test_no_drafts_for_month(build_draft: None) -> None: def test_no_drafts_for_day(build_draft: None) -> None: # folder exists becaues of URL for post assert (Path('build') / '2014' / '10' / '30' / 'index.html').exists() is False + + +def test_draft_without_published(run_start: CliRunner): + # TODO: publish to /drafts/title? + expected_output = '' + set_example_as_draft() + remove_fields_from_example_post(('published', 'updated')) + result = run_start.invoke(build) + assert result.exit_code == 0 + assert result.output == expected_output