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

Function parent_topic_updated

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

Source from the content-addressed store, hash-verified

238
239 #[test]
240 fn parent_topic_updated() {
241 let f = Fixtures::copy("simple");
242 let url = RepoUrl::parse("https://www.google.com").unwrap();
243 let repo_id = RepoId::wiki();
244 let path = url.id().unwrap();
245 let topic = parse_id("00001");
246 assert!(!f.git.exists(repo_id, &path).unwrap());
247
248 let result = f.upsert_link(repo_id, &url, Some("A".into()), Some(topic.to_owned()));
249 let link = result.link.unwrap();
250
251 f.fetch_topic(repo_id, &topic, |parent| {
252 assert_eq!(&topic, parent.topic_id());
253
254 let mut found = false;
255 for child in parent.children {
256 if child.id == link.metadata.id {
257 found = true;
258 break;
259 }
260 }
261 assert!(found, "link not found in parent topic children");
262 });
263 }
264
265 #[test]
266 fn lookup_indexes_updated() {

Callers

nothing calls this directly

Calls 5

parseFunction · 0.85
parse_idFunction · 0.85
idMethod · 0.45
upsert_linkMethod · 0.45
fetch_topicMethod · 0.45

Tested by

no test coverage detected