MCPcopy Create free account
hub / github.com/emwalker/digraph / idempotency

Function idempotency

backend/tests/git/repo.rs:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88 #[test]
89 fn idempotency() {
90 let f = Fixtures::copy("simple");
91 let actor = actor();
92
93 let repo_id = RepoId::other();
94 git::core::Repo::ensure(&f.git.root, repo_id).unwrap();
95 let path = f.git.root.repo_path(repo_id);
96 assert!(path.exists());
97
98 delete(&f, repo_id, &actor, &actor.user_id).unwrap();
99 assert!(!path.exists());
100
101 let result = delete(&f, repo_id, &actor, &actor.user_id);
102 assert!(result.is_ok());
103 assert!(!path.exists());
104 }
105}
106
107mod ensure_personal_repo {

Callers

nothing calls this directly

Calls 4

actorFunction · 0.85
ensureFunction · 0.85
deleteFunction · 0.85
repo_pathMethod · 0.80

Tested by

no test coverage detected