chore: add pre-commit and format files

This commit is contained in:
Sandro Eiler 2023-10-21 13:47:06 +02:00
parent ed4322b8e9
commit c558a6623c
9 changed files with 136 additions and 74 deletions

View file

@ -11,7 +11,6 @@ async fn test_quick_dev() -> Result<()> {
let hc = httpc_test::new_client("http://localhost:3000")?;
hc.do_get("/hello2/mike").await?.print().await?;
hc.do_get("/src/main.rs").await?.print().await?;
hc.do_get("/src/blub.rs").await?.print().await?;
@ -19,22 +18,22 @@ async fn test_quick_dev() -> Result<()> {
let req_login = hc.do_post(
"/api/login",
json!(
{
"username": "demo1",
"password": "demowrong"
}
)
);
{
"username": "demo1",
"password": "demowrong"
}
),
);
req_login.await?.print().await?;
let req_login = hc.do_post(
"/api/login",
json!(
{
"username": "demo1",
"password": "demo1"
}
)
);
{
"username": "demo1",
"password": "demo1"
}
),
);
req_login.await?.print().await?;
hc.do_get("/hello2/mike").await?.print().await?;
@ -42,22 +41,22 @@ async fn test_quick_dev() -> Result<()> {
let req_create_property = hc.do_post(
"/api/properties",
json!(
{
"address": "Lolilat Street 1",
"contact": "01234 567890"
}
)
);
{
"address": "Lolilat Street 1",
"contact": "01234 567890"
}
),
);
req_create_property.await?.print().await?;
let req_create_property = hc.do_post(
"/api/properties",
json!(
{
"address": "Lolilat Street 2",
"contact": "01243 217890"
}
)
);
{
"address": "Lolilat Street 2",
"contact": "01243 217890"
}
),
);
req_create_property.await?.print().await?;
let req_get_properties = hc.do_get("/api/properties").await?;
req_get_properties.print().await?;