()
| 169 | |
| 170 | #[tokio::test] |
| 171 | async fn test_clouddrive_get() { |
| 172 | let service = Rc::from(RefCell::from(MockService::default())); |
| 173 | service.borrow_mut().do_login().await; |
| 174 | let drive = CloudDrive::new(service.clone(), "the-user"); |
| 175 | |
| 176 | service.borrow_mut().add_mock_get_file( |
| 177 | "the-user", |
| 178 | "the-filename", |
| 179 | Ok(b"some content".to_owned()), |
| 180 | ); |
| 181 | let result = drive.get("the-filename").await.unwrap(); |
| 182 | assert_eq!("some content".as_bytes(), result); |
| 183 | |
| 184 | service.take().verify_all_used(); |
| 185 | } |
| 186 | |
| 187 | #[tokio::test] |
| 188 | async fn test_clouddrive_get_no_content() { |
nothing calls this directly
no test coverage detected