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

Function test_intent_update

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

Source from the content-addressed store, hash-verified

1610
1611 #[test]
1612 fn test_intent_update() {
1613 let dir = tempdir().unwrap();
1614 let repo = init_repo_with_vault(dir.path());
1615
1616 let result = repo.vault_intent_create(create_opts("Update me")).unwrap();
1617
1618 let updated = repo
1619 .vault_intent_update(
1620 &result.id,
1621 IntentUpdateOptions {
1622 status: Some("in-progress".to_string()),
1623 assignee: Some("bob".to_string()),
1624 ..Default::default()
1625 },
1626 )
1627 .unwrap();
1628
1629 assert_eq!(updated.status, "in-progress");
1630 assert_eq!(updated.assignee, Some("bob".to_string()));
1631
1632 // Manifest should reflect update
1633 let manifest = repo.vault_manifest().unwrap();
1634 assert_eq!(manifest.intents[&result.id].status, "in-progress");
1635 }
1636
1637 #[test]
1638 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