MCPcopy Index your code
hub / github.com/emwalker/digraph / cannot_delete_root_topic

Function cannot_delete_root_topic

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

Source from the content-addressed store, hash-verified

123
124 #[test]
125 fn cannot_delete_root_topic() {
126 let f = Fixtures::copy("simple");
127 let repo_id = RepoId::wiki();
128 let root = ExternalId::root_topic();
129 let topic = f.git.fetch_topic(repo_id, &root).unwrap();
130 assert!(topic.root());
131
132 let result = DeleteTopic {
133 actor: actor(),
134 repo_id,
135 topic_id: topic.topic_id().to_owned(),
136 }
137 .call(f.mutation(), &redis::Noop);
138
139 assert!(matches!(result, Err(Error::Repo(_))));
140 let topic = f.git.fetch_topic(repo_id, &root).unwrap();
141 assert!(topic.root());
142 }
143
144 fn make_topic(f: &Fixtures, parent: &ExternalId, name: &str) -> RepoTopic {
145 let topic_id = parse_id("dPqrU4sZaPkNZEDyr9T68G4RJYV8bncmIXumedBNls9F994v8poSbxTo7dKK3Vhi");

Callers

nothing calls this directly

Calls 5

actorFunction · 0.85
fetch_topicMethod · 0.45
callMethod · 0.45
topic_idMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected