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

Function test_intent_update

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

Source from the content-addressed store, hash-verified

973
974 #[test]
975 fn test_intent_update() {
976 let dir = tempdir().unwrap();
977 let repo = init_repo_with_vault(dir.path());
978
979 let result = repo.vault_intent_create(create_opts("Update me")).unwrap();
980
981 let updated = repo
982 .vault_intent_update(
983 &result.id,
984 IntentUpdateOptions {
985 status: Some("in-progress".to_string()),
986 assignee: Some("bob".to_string()),
987 ..Default::default()
988 },
989 )
990 .unwrap();
991
992 assert_eq!(updated.status, "in-progress");
993 assert_eq!(updated.assignee, Some("bob".to_string()));
994
995 // Manifest should reflect update
996 let manifest = repo.vault_manifest().unwrap();
997 assert_eq!(manifest.intents[&result.id].status, "in-progress");
998 }
999
1000 #[test]
1001 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