From aa95c26e071a2c4fe9b87e30e116b3e7c01a3d1d Mon Sep 17 00:00:00 2001 From: qdequele Date: Wed, 26 Feb 2020 16:05:02 +0100 Subject: [PATCH] update tests --- meilisearch-http/tests/common.rs | 4 ++-- meilisearch-http/tests/search.rs | 28 ++++++++++++++-------------- meilisearch-http/tests/settings.rs | 18 +++++++++--------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/meilisearch-http/tests/common.rs b/meilisearch-http/tests/common.rs index a9bb0848b..c30888cbe 100644 --- a/meilisearch-http/tests/common.rs +++ b/meilisearch-http/tests/common.rs @@ -66,7 +66,7 @@ pub fn enrich_server_with_movies_settings( "_exactness", "dsc(vote_average)", ], - "rankingDistinct": null, + "distinctAttribute": null, "searchableAttributes": [ "title", "tagline", @@ -92,7 +92,7 @@ pub fn enrich_server_with_movies_settings( ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); let body = json.to_string().into_bytes(); diff --git a/meilisearch-http/tests/search.rs b/meilisearch-http/tests/search.rs index eb510c90b..42fd901e2 100644 --- a/meilisearch-http/tests/search.rs +++ b/meilisearch-http/tests/search.rs @@ -635,7 +635,7 @@ fn search_with_settings_basic() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "title", @@ -662,7 +662,7 @@ fn search_with_settings_basic() { ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -741,7 +741,7 @@ fn search_with_settings_stop_words() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "title", @@ -768,7 +768,7 @@ fn search_with_settings_stop_words() { ], "stopWords": ["the"], "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -848,7 +848,7 @@ fn search_with_settings_synonyms() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "title", @@ -880,7 +880,7 @@ fn search_with_settings_synonyms() { "Iron Man" ] }, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -960,7 +960,7 @@ fn search_with_settings_ranking_rules() { "_exactness", "dsc(popularity)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "title", @@ -987,7 +987,7 @@ fn search_with_settings_ranking_rules() { ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -1067,7 +1067,7 @@ fn search_with_settings_searchable_attributes() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "tagline", @@ -1093,7 +1093,7 @@ fn search_with_settings_searchable_attributes() { ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -1173,7 +1173,7 @@ fn search_with_settings_displayed_attributes() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "title", @@ -1194,7 +1194,7 @@ fn search_with_settings_displayed_attributes() { ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); @@ -1244,7 +1244,7 @@ fn search_with_settings_searchable_attributes_2() { "_exactness", "dsc(vote_average)" ], - "rankingDistinct": null, + "distinctAttribute": null, "identifier": "id", "searchableAttributes": [ "tagline", @@ -1265,7 +1265,7 @@ fn search_with_settings_searchable_attributes_2() { ], "stopWords": null, "synonyms": null, - "indexNewFields": false, + "acceptNewFields": false, }); common::update_config(&mut server, config); diff --git a/meilisearch-http/tests/settings.rs b/meilisearch-http/tests/settings.rs index 19d4ff092..5062616f9 100644 --- a/meilisearch-http/tests/settings.rs +++ b/meilisearch-http/tests/settings.rs @@ -50,7 +50,7 @@ fn write_all_and_delete() { "dsc(release_date)", "dsc(rank)", ], - "rankingDistinct": "movie_id", + "distinctAttribute": "movie_id", "searchableAttributes": [ "id", "movie_id", @@ -76,7 +76,7 @@ fn write_all_and_delete() { "wolverine": ["xmen", "logan"], "logan": ["wolverine"], }, - "indexNewFields": false, + "acceptNewFields": false, }); let body = json.to_string().into_bytes(); @@ -127,12 +127,12 @@ fn write_all_and_delete() { let json = json!({ "rankingRules": null, - "rankingDistinct": null, + "distinctAttribute": null, "searchableAttributes": null, "displayedAttributes": null, "stopWords": null, "synonyms": null, - "indexNewFields": true, + "acceptNewFields": true, }); assert_json_eq!(json, res_value, ordered: false); @@ -178,7 +178,7 @@ fn write_all_and_update() { "dsc(release_date)", "dsc(rank)", ], - "rankingDistinct": "movie_id", + "distinctAttribute": "movie_id", "searchableAttributes": [ "uid", "movie_id", @@ -204,7 +204,7 @@ fn write_all_and_update() { "wolverine": ["xmen", "logan"], "logan": ["wolverine"], }, - "indexNewFields": false, + "acceptNewFields": false, }); let body = json.to_string().into_bytes(); @@ -261,7 +261,7 @@ fn write_all_and_update() { "wolverine": ["xmen", "logan"], "logan": ["wolverine", "xmen"], }, - "indexNewFields": false, + "acceptNewFields": false, }); let body_update = json_update.to_string().into_bytes(); @@ -296,7 +296,7 @@ fn write_all_and_update() { "_exactness", "dsc(release_date)", ], - "rankingDistinct": null, + "distinctAttribute": null, "searchableAttributes": [ "title", "description", @@ -314,7 +314,7 @@ fn write_all_and_update() { "wolverine": ["xmen", "logan"], "logan": ["wolverine", "xmen"], }, - "indexNewFields": false + "acceptNewFields": false }); assert_json_eq!(res_expected, res_value, ordered: false);