| 466 | |
| 467 | #[wasm_bindgen_test] |
| 468 | async fn test_webdrive_put() { |
| 469 | let entry = Entry { |
| 470 | version: Entry::VERSION, |
| 471 | content: b"this is some content".to_vec(), |
| 472 | mtime: OffsetDateTime::from_unix_timestamp(1_234_567).unwrap(), |
| 473 | }; |
| 474 | |
| 475 | let mut webdrive = WebDrive::from_window(); |
| 476 | webdrive.clock = Box::from(FakeClock { now: 1_234_567 }); |
| 477 | webdrive.storage.clear().unwrap(); |
| 478 | webdrive.put("code.bas", &entry.content).await.unwrap(); |
| 479 | |
| 480 | assert_eq!( |
| 481 | serde_json::to_string(&entry).unwrap(), |
| 482 | webdrive.storage.get("endbasic-program:CODE.BAS").unwrap().unwrap() |
| 483 | ); |
| 484 | } |
| 485 | |
| 486 | #[wasm_bindgen_test] |
| 487 | fn test_webdrive_system_path() { |