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

Function viewer_can_read

backend/tests/git/topic.rs:27–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26 #[test]
27 fn viewer_can_read() {
28 let f = Fixtures::copy("simple");
29 let repo_id = RepoId::wiki();
30 let topic = f.topic(repo_id, ROOT_TOPIC_ID);
31 let topic_id = topic.topic_id();
32
33 let git = Client::new(viewer(&vec![RepoId::wiki()]), &f.git.root, Timespec);
34 assert!(git.fetch(repo_id, topic_id).is_some());
35
36 let git = Client::new(viewer(&vec![RepoId::other()]), &f.git.root, Timespec);
37 assert!(!git.exists(repo_id, topic_id).unwrap());
38 assert!(git.fetch(repo_id, topic_id).is_none());
39 }
40}
41
42#[cfg(test)]

Callers

nothing calls this directly

Calls 3

viewerFunction · 0.70
topicMethod · 0.45
topic_idMethod · 0.45

Tested by

no test coverage detected