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

Function test_clouddrive_put_existing

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

Source from the content-addressed store, hash-verified

264
265 #[tokio::test]
266 async fn test_clouddrive_put_existing() {
267 let service = Rc::from(RefCell::from(MockService::default()));
268 service.borrow_mut().do_login().await;
269 let mut drive = CloudDrive::new(service.clone(), "the-user");
270
271 service.borrow_mut().add_mock_patch_file_content(
272 "the-user",
273 "the-filename",
274 "some content",
275 Ok(()),
276 );
277 drive.put("the-filename", b"some content").await.unwrap();
278
279 service.borrow_mut().add_mock_patch_file_content(
280 "the-user",
281 "the-filename",
282 "some other content",
283 Ok(()),
284 );
285 drive.put("the-filename", b"some other content").await.unwrap();
286
287 service.take().verify_all_used();
288 }
289
290 #[tokio::test]
291 async fn test_clouddrive_put_acls() {

Callers

nothing calls this directly

Calls 4

verify_all_usedMethod · 0.80
do_loginMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected