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

Function test_intent_update

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

Source from the content-addressed store, hash-verified

927
928 #[test]
929 fn test_intent_update() {
930 let dir = tempdir().unwrap();
931 let repo = init_repo_with_vault(dir.path());
932
933 let result = repo.vault_intent_create(create_opts("Update me")).unwrap();
934
935 let updated = repo
936 .vault_intent_update(
937 &result.id,
938 IntentUpdateOptions {
939 status: Some("in-progress".to_string()),
940 assignee: Some("bob".to_string()),
941 ..Default::default()
942 },
943 )
944 .unwrap();
945
946 assert_eq!(updated.status, "in-progress");
947 assert_eq!(updated.assignee, Some("bob".to_string()));
948
949 // Manifest should reflect update
950 let manifest = repo.vault_manifest().unwrap();
951 assert_eq!(manifest.intents[&result.id].status, "in-progress");
952 }
953
954 #[test]
955 fn test_intent_update_preserves_disk_edits() {

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