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

Function test_clouddrive_put_new

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

Source from the content-addressed store, hash-verified

247
248 #[tokio::test]
249 async fn test_clouddrive_put_new() {
250 let service = Rc::from(RefCell::from(MockService::default()));
251 service.borrow_mut().do_login().await;
252 let mut drive = CloudDrive::new(service.clone(), "the-user");
253
254 service.borrow_mut().add_mock_patch_file_content(
255 "the-user",
256 "the-filename",
257 "some content",
258 Ok(()),
259 );
260 drive.put("the-filename", b"some content").await.unwrap();
261
262 service.take().verify_all_used();
263 }
264
265 #[tokio::test]
266 async fn test_clouddrive_put_existing() {

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