test attributesToRetrieve

This commit is contained in:
mpostma 2020-12-10 16:15:12 +01:00
parent 2bd5d2474e
commit 90cf4b9462

View File

@ -554,6 +554,16 @@ async fn search_with_attributes_to_retrieve() {
test_post_get_search!(server, query, |response, _status_code| {
assert_json_eq!(expected.clone(), response["hits"].clone(), ordered: false);
});
let query = json!({
"q": "cherry",
"limit": 1,
"attributesToRetrieve": [],
});
test_post_get_search!(server, query, |response, _status_code| {
assert_json_eq!(json!([{}]), response["hits"].clone(), ordered: false);
});
}
#[actix_rt::test]