MCPcopy Index your code
hub / github.com/emwalker/digraph / simple_case

Function simple_case

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

Source from the content-addressed store, hash-verified

1365
1366 #[test]
1367 fn simple_case() {
1368 let topic1 = topic("Climate change");
1369 let topic2 = topic("Climate");
1370 let topic3 = topic("Weather");
1371
1372 let change = Change::UpdateTopicParentTopics(UpdateTopicParentTopics {
1373 actor_id: "2".to_owned(),
1374 added_parent_topics: TopicInfoList::from(&topic2),
1375 date: chrono::Utc::now(),
1376 id: Change::new_id(),
1377 parent_topic_ids: BTreeSet::from([topic3.topic_id().to_owned()]),
1378 removed_parent_topics: TopicInfoList::new(),
1379 updated_topic: TopicInfo::from(&topic1),
1380 });
1381
1382 assert_eq!(
1383 change.markdown(Locale::EN, "Gnusto", None),
1384 format!(
1385 "Gnusto placed [Climate change]({}) under [Climate]({})",
1386 topic1.relative_url(),
1387 topic2.relative_url()
1388 ),
1389 );
1390 }
1391
1392 #[test]
1393 fn paths() {

Callers

nothing calls this directly

Calls 8

topicFunction · 0.85
changeFunction · 0.85
dateFunction · 0.85
linkFunction · 0.70
UpsertLinkClass · 0.70
UpsertTopicClass · 0.70
topic_idMethod · 0.45

Tested by

no test coverage detected