Add cookie based auth, file serving and uploading
This commit is contained in:
17
tests/requests/data.rs
Normal file
17
tests/requests/data.rs
Normal 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;
|
||||
}
|
||||
|
@@ -1,2 +1,4 @@
|
||||
mod auth;
|
||||
mod prepare_data;
|
||||
|
||||
pub mod data;
|
Reference in New Issue
Block a user