MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_intent_update

Function test_intent_update

atomic-repository/src/repository/vault_intent.rs:1182–1205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 7

init_repo_with_vaultFunction · 0.85
create_optsFunction · 0.85
vault_intent_createMethod · 0.80
vault_intent_updateMethod · 0.80
vault_manifestMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected