test: new project - Testabdeckung fuer die required-responsibility-Ablehnung (#126)
CI / verify (push) Successful in 46s
Release / release (push) Successful in 35s

Files changed:
- CHANGES.md
- VERSION
- tools/chemenu/tests/test_new_page.py
This commit is contained in:
torben committed 2026-09-20 07:33:51 +02:00
1 parent e4260fc2de
commit 6324024d7a
3 files changed
+24 -2

No files matched your search

+10
View File
@@ -139,6 +139,16 @@ def test_new_project_creates_page_with_expected_frontmatter(monkeypatch, kb_dir)
assert f"## {heading}" in body
def test_new_project_requires_responsibility(monkeypatch, kb_dir):
"""Gitea #126's own AC: `--responsibility` (via `--set responsibility=...`)
is required. `types/project.schema.yaml` already lists it in `required:`
(#123) with no `default:`, so this needs no new code - only a test that
the generic schema-required refusal actually covers it for `project`."""
result = _invoke_new(monkeypatch, kb_dir, ["new", "project", "--name", "Ohne Bereich"])
assert result.exit_code == 1
assert not list(kb_dir.rglob("Ohne Bereich.md"))
def test_new_project_refuses_a_responsibility_outside_the_enum(monkeypatch, kb_dir):
result = _invoke_new(monkeypatch, kb_dir, [
"new", "project", "--name", "Badvorhaben", "--set", "responsibility=nichtexistent",