More relevant test

Co-authored-by: Many the fish <many@meilisearch.com>
This commit is contained in:
Louis Dureuil 2023-07-12 16:06:15 +02:00 committed by GitHub
parent 16c8437b28
commit 183f23f40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,15 +77,15 @@ async fn search_no_searchable_attribute_set() {
)
.await;
index.update_settings_searchable_attributes(json!(["description", "*", "title"])).await;
index.update_settings_searchable_attributes(json!(["*"])).await;
index.wait_task(2).await;
index
.search(
json!({"q": "Captain Marvel", "attributesToSearchOn": ["unknown"]}),
json!({"q": "Captain Marvel", "attributesToSearchOn": ["unknown", "title"]}),
|response, code| {
snapshot!(code, @"200 OK");
snapshot!(response["hits"].as_array().unwrap().len(), @"0");
snapshot!(response["hits"].as_array().unwrap().len(), @"2");
},
)
.await;