()
| 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() { |
nothing calls this directly
no test coverage detected