mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fix tests
This commit is contained in:
parent
b0c33ed6d2
commit
72e2b220ed
20 changed files with 217 additions and 217 deletions
|
@ -49,7 +49,7 @@ async fn search_bad_q() {
|
|||
"message": "Invalid value type at `.q`: expected a string, but found an array: `[\"doggo\"]`",
|
||||
"code": "invalid_search_q",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-q"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_q"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `q` fail with a get search since it'll accept anything as a string.
|
||||
|
@ -67,7 +67,7 @@ async fn search_bad_offset() {
|
|||
"message": "Invalid value type at `.offset`: expected a positive integer, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_offset",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-offset"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_offset"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -78,7 +78,7 @@ async fn search_bad_offset() {
|
|||
"message": "Invalid value in parameter `offset`: could not parse `doggo` as a positive integer",
|
||||
"code": "invalid_search_offset",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-offset"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_offset"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ async fn search_bad_limit() {
|
|||
"message": "Invalid value type at `.limit`: expected a positive integer, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_limit",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-limit"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_limit"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -106,7 +106,7 @@ async fn search_bad_limit() {
|
|||
"message": "Invalid value in parameter `limit`: could not parse `doggo` as a positive integer",
|
||||
"code": "invalid_search_limit",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-limit"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_limit"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ async fn search_bad_page() {
|
|||
"message": "Invalid value type at `.page`: expected a positive integer, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_page",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-page"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_page"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -134,7 +134,7 @@ async fn search_bad_page() {
|
|||
"message": "Invalid value in parameter `page`: could not parse `doggo` as a positive integer",
|
||||
"code": "invalid_search_page",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-page"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_page"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ async fn search_bad_hits_per_page() {
|
|||
"message": "Invalid value type at `.hitsPerPage`: expected a positive integer, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_hits_per_page",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-hits-per-page"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_hits_per_page"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -162,7 +162,7 @@ async fn search_bad_hits_per_page() {
|
|||
"message": "Invalid value in parameter `hitsPerPage`: could not parse `doggo` as a positive integer",
|
||||
"code": "invalid_search_hits_per_page",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-hits-per-page"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_hits_per_page"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ async fn search_bad_attributes_to_crop() {
|
|||
"message": "Invalid value type at `.attributesToCrop`: expected an array, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_attributes_to_crop",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-attributes-to-crop"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_attributes_to_crop"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `attributes_to_crop` fail with a get search since it'll accept anything as an array of strings.
|
||||
|
@ -197,7 +197,7 @@ async fn search_bad_crop_length() {
|
|||
"message": "Invalid value type at `.cropLength`: expected a positive integer, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_crop_length",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-crop-length"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_crop_length"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -208,7 +208,7 @@ async fn search_bad_crop_length() {
|
|||
"message": "Invalid value in parameter `cropLength`: could not parse `doggo` as a positive integer",
|
||||
"code": "invalid_search_crop_length",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-crop-length"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_crop_length"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ async fn search_bad_attributes_to_highlight() {
|
|||
"message": "Invalid value type at `.attributesToHighlight`: expected an array, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_attributes_to_highlight",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-attributes-to-highlight"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_attributes_to_highlight"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `attributes_to_highlight` fail with a get search since it'll accept anything as an array of strings.
|
||||
|
@ -251,7 +251,7 @@ async fn search_bad_filter() {
|
|||
"message": "Invalid syntax for the filter parameter: `expected String, Array, found: true`.",
|
||||
"code": "invalid_search_filter",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `filter` fail with a get search since it'll accept anything as a strings.
|
||||
|
@ -269,7 +269,7 @@ async fn search_bad_sort() {
|
|||
"message": "Invalid value type at `.sort`: expected an array, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_sort",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `sort` fail with a get search since it'll accept anything as a strings.
|
||||
|
@ -287,7 +287,7 @@ async fn search_bad_show_matches_position() {
|
|||
"message": "Invalid value type at `.showMatchesPosition`: expected a boolean, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_show_matches_position",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-show-matches-position"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_show_matches_position"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -298,7 +298,7 @@ async fn search_bad_show_matches_position() {
|
|||
"message": "Invalid value in parameter `showMatchesPosition`: could not parse `doggo` as a boolean, expected either `true` or `false`",
|
||||
"code": "invalid_search_show_matches_position",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-show-matches-position"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_show_matches_position"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ async fn search_bad_facets() {
|
|||
"message": "Invalid value type at `.facets`: expected an array, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_search_facets",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-facets"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_facets"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `attributes_to_highlight` fail with a get search since it'll accept anything as an array of strings.
|
||||
|
@ -336,7 +336,7 @@ async fn search_non_filterable_facets() {
|
|||
"message": "Invalid facet distribution, the fields `doggo` are not set as filterable.",
|
||||
"code": "invalid_search_facets",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-facets"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_facets"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -347,7 +347,7 @@ async fn search_non_filterable_facets() {
|
|||
"message": "Invalid facet distribution, the fields `doggo` are not set as filterable.",
|
||||
"code": "invalid_search_facets",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-facets"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_facets"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ async fn search_bad_highlight_pre_tag() {
|
|||
"message": "Invalid value type at `.highlightPreTag`: expected a string, but found an array: `[\"doggo\"]`",
|
||||
"code": "invalid_search_highlight_pre_tag",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-highlight-pre-tag"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_highlight_pre_tag"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `highlight_pre_tag` fail with a get search since it'll accept anything as a strings.
|
||||
|
@ -382,7 +382,7 @@ async fn search_bad_highlight_post_tag() {
|
|||
"message": "Invalid value type at `.highlightPostTag`: expected a string, but found an array: `[\"doggo\"]`",
|
||||
"code": "invalid_search_highlight_post_tag",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-highlight-post-tag"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_highlight_post_tag"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `highlight_post_tag` fail with a get search since it'll accept anything as a strings.
|
||||
|
@ -400,7 +400,7 @@ async fn search_bad_crop_marker() {
|
|||
"message": "Invalid value type at `.cropMarker`: expected a string, but found an array: `[\"doggo\"]`",
|
||||
"code": "invalid_search_crop_marker",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-crop-marker"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_crop_marker"
|
||||
}
|
||||
"###);
|
||||
// Can't make the `crop_marker` fail with a get search since it'll accept anything as a strings.
|
||||
|
@ -418,7 +418,7 @@ async fn search_bad_matching_strategy() {
|
|||
"message": "Unknown value `doggo` at `.matchingStrategy`: expected one of `last`, `all`",
|
||||
"code": "invalid_search_matching_strategy",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_matching_strategy"
|
||||
}
|
||||
"###);
|
||||
|
||||
|
@ -429,7 +429,7 @@ async fn search_bad_matching_strategy() {
|
|||
"message": "Unknown value `doggo` for parameter `matchingStrategy`: expected one of `last`, `all`",
|
||||
"code": "invalid_search_matching_strategy",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy"
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_matching_strategy"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue