()
| 390 | |
| 391 | #[test] |
| 392 | fn synonyms_deduped() { |
| 393 | let f = Fixtures::copy("simple"); |
| 394 | let repo_id = RepoId::wiki(); |
| 395 | let topic_id = parse_id("00001"); |
| 396 | let topic = f.git.fetch_topic(repo_id, &topic_id).unwrap(); |
| 397 | |
| 398 | assert_eq!(topic.name(Locale::EN), "A topic"); |
| 399 | assert_eq!(topic.synonyms().len(), 1); |
| 400 | |
| 401 | assert_eq!(count(&f, "A topic"), 1); |
| 402 | |
| 403 | let UpdateTopicSynonymsResult { |
| 404 | repo_topic, alerts, .. |
| 405 | } = UpdateTopicSynonyms { |
| 406 | actor: actor(), |
| 407 | repo_id, |
| 408 | topic_id, |
| 409 | synonyms: vec![synonym("A topic"), synonym("A topic")], |
| 410 | } |
| 411 | .call(f.mutation(), &redis::Noop) |
| 412 | .unwrap(); |
| 413 | |
| 414 | assert_eq!(repo_topic.synonyms().len(), 1); |
| 415 | assert_eq!(count(&f, "A topic"), 1); |
| 416 | |
| 417 | // There's an alert |
| 418 | assert_eq!(alerts.len(), 1); |
| 419 | } |
| 420 | |
| 421 | #[test] |
| 422 | fn synonyms_removed() { |
nothing calls this directly
no test coverage detected