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

Function no_orphans

backend/tests/git/link.rs:166–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164
165 #[test]
166 fn no_orphans() {
167 let f = Fixtures::copy("simple");
168 let url = valid_url();
169 let repo_id = RepoId::wiki();
170 let link_id = url.id().unwrap();
171 assert!(!f.git.exists(repo_id, &link_id).unwrap());
172
173 f.upsert_link(repo_id, &url, None, None);
174
175 f.fetch_link(repo_id, &link_id, |link| {
176 assert_eq!(link.parent_topics.len(), 1);
177 let topic = link.parent_topics.iter().next().unwrap();
178 assert_eq!(topic.id, ExternalId::root_topic());
179 });
180 }
181
182 #[test]
183 fn updates_are_idempotent() {

Callers

nothing calls this directly

Calls 6

valid_urlFunction · 0.85
nextMethod · 0.80
idMethod · 0.45
upsert_linkMethod · 0.45
fetch_linkMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected