From dcd60a5b459c5c17346bb0698bdbc8c30cd14357 Mon Sep 17 00:00:00 2001 From: tamo Date: Tue, 6 Apr 2021 18:29:38 +0200 Subject: [PATCH] add more tests for the stop_words --- meilisearch-http/tests/settings/get_settings.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/tests/settings/get_settings.rs b/meilisearch-http/tests/settings/get_settings.rs index 34ab45be1..be09a5090 100644 --- a/meilisearch-http/tests/settings/get_settings.rs +++ b/meilisearch-http/tests/settings/get_settings.rs @@ -78,13 +78,14 @@ async fn reset_all_settings() { let server = Server::new().await; let index = server.index("test"); index - .update_settings(json!({"displayedAttributes": ["foo"], "searchableAttributes": ["bar"]})) + .update_settings(json!({"displayedAttributes": ["foo"], "searchableAttributes": ["bar"], "stopWords": ["the"] })) .await; index.wait_update_id(0).await; let (response, code) = index.settings().await; assert_eq!(code, 200); assert_eq!(response["displayedAttributes"], json!(["foo"])); assert_eq!(response["searchableAttributes"], json!(["bar"])); + assert_eq!(response["stopWords"], json!(["the"])); index.delete_settings().await; index.wait_update_id(1).await; @@ -93,6 +94,7 @@ async fn reset_all_settings() { assert_eq!(code, 200); assert_eq!(response["displayedAttributes"], json!(["*"])); assert_eq!(response["searchableAttributes"], json!(["*"])); + assert_eq!(response["stopWords"], json!([])); } #[actix_rt::test] @@ -166,5 +168,6 @@ macro_rules! test_setting_routes { test_setting_routes!( attributes_for_faceting, displayed_attributes, - searchable_attributes + searchable_attributes, + stop_words );