add tests

This commit is contained in:
mpostma
2021-02-24 11:15:48 +01:00
parent 3987d17e40
commit 561f29042c
6 changed files with 38 additions and 6 deletions

View File

@ -90,6 +90,15 @@ async fn update_setting_unexisting_index() {
assert_eq!(code, 200);
}
#[actix_rt::test]
async fn update_setting_unexisting_index_invalid_uid() {
let server = Server::new().await;
let index = server.index("test##! ");
let (_response, code) = index.update_settings(json!({})).await;
println!("response: {}", _response);
assert_eq!(code, 400);
}
macro_rules! test_setting_routes {
($($setting:ident), *) => {
$(