()
| 1417 | |
| 1418 | #[test] |
| 1419 | fn added_and_removed() { |
| 1420 | let topic1 = topic("Climate change"); |
| 1421 | |
| 1422 | let change = Change::UpdateTopicSynonyms(UpdateTopicSynonyms { |
| 1423 | actor_id: "2".to_owned(), |
| 1424 | added_synonyms: SynonymList(BTreeMap::from([( |
| 1425 | Locale::EN, |
| 1426 | "Added synonym".to_owned(), |
| 1427 | )])), |
| 1428 | date: chrono::Utc::now(), |
| 1429 | id: Change::new_id(), |
| 1430 | parent_topics: BTreeSet::new(), |
| 1431 | removed_synonyms: SynonymList(BTreeMap::from([( |
| 1432 | Locale::EN, |
| 1433 | "Removed synonym".to_owned(), |
| 1434 | )])), |
| 1435 | reordered: false, |
| 1436 | // parent_topic: TopicInfo::from(&topic2), |
| 1437 | updated_topic: TopicInfo::from(&topic1), |
| 1438 | }); |
| 1439 | |
| 1440 | assert_eq!( |
| 1441 | change.markdown(Locale::EN, "Gnusto", None), |
| 1442 | format!( |
| 1443 | "Gnusto added \"Added synonym\" to and removed \"Removed synonym\" \ |
| 1444 | from [Climate change]({})", |
| 1445 | topic1.relative_url(), |
| 1446 | ), |
| 1447 | ); |
| 1448 | } |
| 1449 | |
| 1450 | #[test] |
| 1451 | fn removed() { |
nothing calls this directly
no test coverage detected