add tests for post search route

This commit is contained in:
mpostma
2020-06-01 14:54:12 +02:00
parent 0ebf7b6214
commit 26d29783ce
7 changed files with 576 additions and 339 deletions

View File

@ -45,12 +45,12 @@ async fn add_documents_and_stop_words() {
// 3 - Search for a document with stop words
let (response, _status_code) = server.search("q=the%20mask").await;
let (response, _status_code) = server.search_get("q=the%20mask").await;
assert!(!response["hits"].as_array().unwrap().is_empty());
// 4 - Search for documents with *only* stop words
let (response, _status_code) = server.search("q=the%20of").await;
let (response, _status_code) = server.search_get("q=the%20of").await;
assert!(response["hits"].as_array().unwrap().is_empty());
// 5 - Delete all stop words