mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Add test
This commit is contained in:
parent
74747b65b1
commit
5dd582918d
1 changed files with 11 additions and 0 deletions
|
@ -512,6 +512,17 @@ async fn search_bad_matching_strategy() {
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
|
let (response, code) = index.search_post(json!({"matchingStrategy": {"doggo": "doggo"}})).await;
|
||||||
|
snapshot!(code, @"400 Bad Request");
|
||||||
|
snapshot!(json_string!(response), @r###"
|
||||||
|
{
|
||||||
|
"message": "Invalid value type at `.matchingStrategy`: expected a string, but found an object: `{\"doggo\":\"doggo\"}`",
|
||||||
|
"code": "invalid_search_matching_strategy",
|
||||||
|
"type": "invalid_request",
|
||||||
|
"link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy"
|
||||||
|
}
|
||||||
|
"###);
|
||||||
|
|
||||||
let (response, code) = index.search_get("matchingStrategy=doggo").await;
|
let (response, code) = index.search_get("matchingStrategy=doggo").await;
|
||||||
snapshot!(code, @"400 Bad Request");
|
snapshot!(code, @"400 Bad Request");
|
||||||
snapshot!(json_string!(response), @r###"
|
snapshot!(json_string!(response), @r###"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue