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

Function no_cycles

backend/tests/git/topic.rs:319–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317
318 #[test]
319 fn no_cycles() {
320 let f = Fixtures::copy("simple");
321 let repo_id = RepoId::wiki();
322 let parent = f.topic(repo_id, ROOT_TOPIC_ID);
323 let child = f.topic(repo_id, "00001");
324 assert!(parent.has_child(child.topic_id()));
325
326 let result = UpdateTopicParentTopics {
327 actor: actor(),
328 repo_id,
329 topic_id: parent.topic_id(),
330 parent_topic_ids: &[child.topic_id().to_owned()],
331 }
332 .call(f.mutation(), &redis::Noop);
333
334 assert!(matches!(result, Err(Error::Repo(_))));
335 }
336}
337
338#[cfg(test)]

Callers

nothing calls this directly

Calls 11

actorFunction · 0.85
parse_idFunction · 0.85
UpdateClass · 0.85
nextMethod · 0.80
topicMethod · 0.45
callMethod · 0.45
topic_idMethod · 0.45
mutationMethod · 0.45
fetch_topicMethod · 0.45
upsert_topicMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected