()
| 692 | |
| 693 | #[test] |
| 694 | fn gate_rejects_done_intent_with_open_task() { |
| 695 | let mut node = attested_base(); |
| 696 | node.status = "done".to_string(); |
| 697 | node.has_acceptance_criterion = vec![{ |
| 698 | let mut a = ac("urn:atomic:ac:gate-1-ac-1"); |
| 699 | a.ac_status = "met".to_string(); |
| 700 | a.verified_by = Some("did:atomic:lee".to_string()); |
| 701 | a.evidence = Some("urn:atomic:change:01J8".to_string()); |
| 702 | a |
| 703 | }]; |
| 704 | // Task is still open while the intent claims to be done. |
| 705 | node.has_task = vec![task( |
| 706 | "urn:atomic:task:gate-1-1", |
| 707 | &["urn:atomic:ac:gate-1-ac-1"], |
| 708 | )]; |
| 709 | |
| 710 | let report = validate_intent(&node); |
| 711 | assert!(!report.conforms); |
| 712 | assert!(report.results.iter().any(|v| v.shape == "IntentShape" |
| 713 | && v.path.as_deref() == Some("status") |
| 714 | && v.message.contains("every task must be done"))); |
| 715 | } |
| 716 | |
| 717 | #[test] |
| 718 | fn gate_rejects_done_intent_with_unmet_criterion() { |
nothing calls this directly
no test coverage detected