From 90cf4b9462f7a0a5c5b9462ad6a41b3b1bf05618 Mon Sep 17 00:00:00 2001 From: mpostma Date: Thu, 10 Dec 2020 16:15:12 +0100 Subject: [PATCH] test attributesToRetrieve --- meilisearch-http/tests/search.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meilisearch-http/tests/search.rs b/meilisearch-http/tests/search.rs index 267c98265..1d1a60678 100644 --- a/meilisearch-http/tests/search.rs +++ b/meilisearch-http/tests/search.rs @@ -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]