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

Function parent_topic_added

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

Source from the content-addressed store, hash-verified

248
249 #[test]
250 fn parent_topic_added() {
251 let f = Fixtures::copy("simple");
252 let repo_id = RepoId::wiki();
253 let parent = f.topic(repo_id, "00001");
254 assert_eq!(parent.children, BTreeSet::new());
255
256 let child = f.topic(repo_id, "00002");
257 assert!(!parent.has_child(child.topic_id()));
258
259 let result = UpdateTopicParentTopics {
260 actor: actor(),
261 repo_id,
262 topic_id: child.topic_id(),
263 parent_topic_ids: &[parent.topic_id().to_owned()],
264 }
265 .call(f.mutation(), &redis::Noop)
266 .unwrap();
267
268 assert_eq!(result.repo_topic, child);
269
270 let parent = f.topic(repo_id, "00001");
271 let child = f.topic(repo_id, "00002");
272 assert!(parent.has_child(child.topic_id()));
273 }
274
275 #[test]
276 fn parent_topic_removed() {

Callers

nothing calls this directly

Calls 5

actorFunction · 0.85
topicMethod · 0.45
callMethod · 0.45
topic_idMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected