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

Function delete_link

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

Source from the content-addressed store, hash-verified

1302
1303 #[test]
1304 fn delete_link() {
1305 let link = link("Reddit", "http://www.reddit.com");
1306 let topic1 = topic("Climate change");
1307 let topic2 = topic("Weather");
1308
1309 let change = Change::DeleteLink(DeleteLink {
1310 actor_id: "2".to_owned(),
1311 date: chrono::Utc::now(),
1312 deleted_link: LinkInfo {
1313 deleted: false,
1314 id: link.id().to_owned(),
1315 title: link.title().to_owned(),
1316 url: link.url().to_owned(),
1317 },
1318 id: Change::new_id(),
1319 parent_topics: TopicInfoList(BTreeSet::from([
1320 TopicInfo::from(&topic1),
1321 TopicInfo::from(&topic2),
1322 ])),
1323 });
1324
1325 assert_eq!(
1326 change.markdown(Locale::EN, "Gnusto", None),
1327 format!(
1328 "Gnusto deleted [Reddit](http://www.reddit.com), removing it from [Climate change]({}) and \
1329 [Weather]({})",
1330 topic1.relative_url(),
1331 topic2.relative_url(),
1332 )
1333 );
1334 }
1335
1336 #[test]
1337 fn delete_topic() {

Callers

nothing calls this directly

Calls 7

topicFunction · 0.85
TopicInfoListClass · 0.85
linkFunction · 0.70
DeleteLinkClass · 0.70
idMethod · 0.45
titleMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected