MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_clouddrive_get_acls

Function test_clouddrive_get_acls

client/src/drive.rs:218–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217 #[tokio::test]
218 async fn test_clouddrive_get_acls() {
219 let service = Rc::from(RefCell::from(MockService::default()));
220 service.borrow_mut().do_login().await;
221 let drive = CloudDrive::new(service.clone(), "the-user");
222
223 let response = FileAcls { readers: vec!["r1".to_owned(), "r2".to_owned()] };
224 service.borrow_mut().add_mock_get_file_acls("the-user", "the-filename", Ok(response));
225 let result = drive.get_acls("the-filename").await.unwrap();
226 assert_eq!(FileAcls::default().with_readers(["r1".to_owned(), "r2".to_owned()]), result);
227
228 service.take().verify_all_used();
229 }
230
231 #[tokio::test]
232 async fn test_clouddrive_get_acls_no_readers() {

Callers

nothing calls this directly

Calls 4

verify_all_usedMethod · 0.80
do_loginMethod · 0.45
get_aclsMethod · 0.45

Tested by

no test coverage detected