| 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)] |