()
| 1180 | |
| 1181 | #[test] |
| 1182 | fn test_intent_update() { |
| 1183 | let dir = tempdir().unwrap(); |
| 1184 | let repo = init_repo_with_vault(dir.path()); |
| 1185 | |
| 1186 | let result = repo.vault_intent_create(create_opts("Update me")).unwrap(); |
| 1187 | |
| 1188 | let updated = repo |
| 1189 | .vault_intent_update( |
| 1190 | &result.id, |
| 1191 | IntentUpdateOptions { |
| 1192 | status: Some("in-progress".to_string()), |
| 1193 | assignee: Some("bob".to_string()), |
| 1194 | ..Default::default() |
| 1195 | }, |
| 1196 | ) |
| 1197 | .unwrap(); |
| 1198 | |
| 1199 | assert_eq!(updated.status, "in-progress"); |
| 1200 | assert_eq!(updated.assignee, Some("bob".to_string())); |
| 1201 | |
| 1202 | // Manifest should reflect update |
| 1203 | let manifest = repo.vault_manifest().unwrap(); |
| 1204 | assert_eq!(manifest.intents[&result.id].status, "in-progress"); |
| 1205 | } |
| 1206 | |
| 1207 | #[test] |
| 1208 | fn test_intent_update_preserves_reason_and_lineage_metadata() { |
nothing calls this directly
no test coverage detected