generated from coulomb/repo-seed
Add validation indexes and generated views
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import json
|
||||
import shutil
|
||||
|
||||
from info_tech_canon.cli import main
|
||||
from info_tech_canon.service import DEFAULT_INFOSPACE_ROOT
|
||||
|
||||
|
||||
def test_cli_inspect_emits_json(capsys) -> None:
|
||||
@@ -19,3 +21,15 @@ def test_cli_missing_profile_uses_structured_error(capsys) -> None:
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is False
|
||||
assert payload["error"]["code"] == "missing_profile"
|
||||
|
||||
|
||||
def test_cli_index_generates_views(capsys, tmp_path) -> None:
|
||||
root = tmp_path / "infospace"
|
||||
shutil.copytree(DEFAULT_INFOSPACE_ROOT, root)
|
||||
|
||||
exit_code = main(["--root", str(root), "index"])
|
||||
|
||||
assert exit_code == 0
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is True
|
||||
assert (root / "views" / "kernel-overview.md").is_file()
|
||||
|
||||
Reference in New Issue
Block a user