This commit is contained in:
qdequele 2020-08-17 17:42:48 +02:00 committed by qdequele
parent 90226dc8a9
commit ab170ce4fd
1 changed files with 16 additions and 0 deletions

View File

@ -495,3 +495,19 @@ async fn placeholder_test_sort() {
});
});
}
#[actix_rt::test]
async fn placeholder_search_with_empty_query() {
let mut server = common::Server::test_server().await;
let query = json! ({
"q": "",
"limit": 3
});
test_post_get_search!(server, query, |response, status_code| {
eprintln!("{}", response);
assert_eq!(status_code, 200);
assert_eq!(response["hits"].as_array().unwrap().len(), 3);
});
}