diff --git a/tests/test_template_filter.py b/tests/test_template_filter.py new file mode 100644 index 0000000..c3db05e --- /dev/null +++ b/tests/test_template_filter.py @@ -0,0 +1,15 @@ +"""Tests for template filter.""" + +import json +from click.testing import CliRunner +from bloggereasy.cli import cli + +def test_list_tags(tmp_path): + templates_dir = tmp_path / "data" / "templates" + templates_dir.mkdir(parents=True) + (templates_dir / "minimal.json").write_text(json.dumps({"name": "Minimal", "tags": ["clean", "simple"]})) + + runner = CliRunner() + result = runner.invoke(cli, ["templates", "--list-tags"], catch_exceptions=False) + assert "clean" in result.output + assert "simple" in result.output