()
| 200 | |
| 201 | #[test] |
| 202 | fn details_updated() { |
| 203 | let f = Fixtures::copy("simple"); |
| 204 | let url = RepoUrl::parse("https://www.google.com").unwrap(); |
| 205 | let repo_id = RepoId::wiki(); |
| 206 | let path = url.id().unwrap(); |
| 207 | |
| 208 | assert!(!f.git.exists(repo_id, &path).unwrap()); |
| 209 | |
| 210 | f.upsert_link(repo_id, &url, Some("A".into()), Some(parse_id("00001"))); |
| 211 | |
| 212 | f.fetch_link(repo_id, &path, |link| { |
| 213 | assert_eq!(link.title(), "A"); |
| 214 | |
| 215 | let topics = link |
| 216 | .parent_topics |
| 217 | .iter() |
| 218 | .map(|topic| topic.id.to_string()) |
| 219 | .collect::<Vec<String>>(); |
| 220 | |
| 221 | assert_eq!(topics, &["00001"]); |
| 222 | }); |
| 223 | |
| 224 | f.upsert_link(repo_id, &url, Some("B".into()), Some(parse_id("00002"))); |
| 225 | |
| 226 | f.fetch_link(repo_id, &path, |link| { |
| 227 | assert_eq!(link.title(), "B"); |
| 228 | |
| 229 | let topics = link |
| 230 | .parent_topics |
| 231 | .iter() |
| 232 | .map(|topic| topic.id.to_string()) |
| 233 | .collect::<Vec<String>>(); |
| 234 | |
| 235 | assert_eq!(topics, &["00001", "00002"]); |
| 236 | }); |
| 237 | } |
| 238 | |
| 239 | #[test] |
| 240 | fn parent_topic_updated() { |
nothing calls this directly
no test coverage detected