diff --git a/mcp-server/tests/test_reindex_on_change.py b/mcp-server/tests/test_reindex_on_change.py index 35c29c2..e418486 100644 --- a/mcp-server/tests/test_reindex_on_change.py +++ b/mcp-server/tests/test_reindex_on_change.py @@ -80,3 +80,10 @@ def test_reindex_case_law_missing_row_raises(monkeypatch): monkeypatch.setattr(ingest.db, "get_case_law", _none) with pytest.raises(ValueError, match="not found"): _run(ingest.reindex_case_law(uuid4())) + + +def test_reindex_case_law_empty_text_raises(monkeypatch): + async def _empty(x): return {"id": uuid4(), "full_text": " "} + monkeypatch.setattr(ingest.db, "get_case_law", _empty) + with pytest.raises(ValueError, match="no stored full_text"): + _run(ingest.reindex_case_law(uuid4()))