"""Example API tests — scaffold for future suites (spec §8.4).""" def test_health(client): resp = client.get("/api/health") assert resp.status_code == 200 assert resp.json() == {"status": "ok"} def test_list_foods_returns_list(client): """GET /api/foods returns a list (may contain data from other tests).""" resp = client.get("/api/foods") assert resp.status_code == 200 assert isinstance(resp.json(), list) def test_get_log_empty(client): resp = client.get("/api/log", params={"date": "2026-07-25"}) assert resp.status_code == 200 assert resp.json() == [] def test_current_target_none(client): resp = client.get("/api/targets/current") assert resp.status_code == 404