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

Function activity_log_updated

backend/tests/git/link.rs:41–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40 #[test]
41 fn activity_log_updated() {
42 let f = Fixtures::copy("simple");
43
44 let repo_id = RepoId::wiki();
45 let link = link(&f, "Page title", "00001");
46 let link_id = link.id();
47
48 let activity = f.git.fetch_activity(repo_id, link_id, 1).unwrap();
49
50 assert!(!activity.is_empty());
51
52 DeleteLink {
53 actor: actor(),
54 repo_id,
55 link_id: link_id.clone(),
56 }
57 .call(f.mutation(), &redis::Noop)
58 .unwrap();
59
60 let activity = f.git.fetch_activity(repo_id, link_id, 100).unwrap();
61 let mut found = false;
62
63 for change in activity {
64 if let activity::Change::UpsertLink(activity::UpsertLink { upserted_link, .. }) = change
65 {
66 if &upserted_link.id == link_id {
67 assert!(upserted_link.deleted);
68 found = true;
69 }
70 }
71 }
72
73 assert!(found);
74 }
75}
76
77mod update_link_parent_topics {

Callers

nothing calls this directly

Calls 6

actorFunction · 0.85
linkFunction · 0.70
idMethod · 0.45
fetch_activityMethod · 0.45
callMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected