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

Function timerange_deleted

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

Source from the content-addressed store, hash-verified

209
210 #[test]
211 fn timerange_deleted() {
212 let f = Fixtures::copy("simple");
213 let repo_id = RepoId::wiki();
214 let topic_id = parse_id("00001");
215
216 UpsertTopicTimerange {
217 actor: actor(),
218 repo_id,
219 timerange: Timerange {
220 prefix_format: TimerangePrefixFormat::StartYearMonth,
221 starts: Geotime::now().into(),
222 },
223 topic_id: topic_id.to_owned(),
224 }
225 .call(f.mutation(), &redis::Noop)
226 .unwrap();
227
228 let topic = f.git.fetch_topic(repo_id, &topic_id).unwrap();
229 assert!(topic.timerange().is_some());
230
231 RemoveTopicTimerange {
232 actor: actor(),
233 repo_id,
234 topic_id: topic_id.to_owned(),
235 }
236 .call(f.mutation(), &redis::Noop)
237 .unwrap();
238
239 let topic = f.git.fetch_topic(repo_id, &topic_id).unwrap();
240 assert!(topic.timerange().is_none());
241 }
242}
243
244#[cfg(test)]

Callers

nothing calls this directly

Calls 5

parse_idFunction · 0.85
actorFunction · 0.85
callMethod · 0.45
mutationMethod · 0.45
fetch_topicMethod · 0.45

Tested by

no test coverage detected