Add cookie based auth, file serving and uploading

This commit is contained in:
2024-11-03 01:25:28 +01:00
parent c83c0e7ec4
commit 5c69317660
19 changed files with 418 additions and 45 deletions

17
tests/requests/data.rs Normal file
View File

@@ -0,0 +1,17 @@
use gabrielkaszewski_rs::app::App;
use loco_rs::testing;
use serial_test::serial;
#[tokio::test]
#[serial]
async fn can_get_data() {
testing::request::<App, _, _>(|request, _ctx| async move {
let res = request.get("/data/").await;
assert_eq!(res.status_code(), 200);
// you can assert content like this:
// assert_eq!(res.text(), "content");
})
.await;
}