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

Function added_and_removed

backend/src/git/activity.rs:1419–1448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

topicFunction · 0.85
UpdateTopicSynonymsClass · 0.70
SynonymListClass · 0.70

Tested by

no test coverage detected