From cf6c6eb11761208bfa3420630fc151453a7cebf8 Mon Sep 17 00:00:00 2001 From: mpostma Date: Wed, 3 Jun 2020 18:27:20 +0200 Subject: [PATCH] test invalid query params --- meilisearch-http/tests/search.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meilisearch-http/tests/search.rs b/meilisearch-http/tests/search.rs index 559c1d0cc..4597ee7f1 100644 --- a/meilisearch-http/tests/search.rs +++ b/meilisearch-http/tests/search.rs @@ -1414,3 +1414,14 @@ async fn highlight_cropped_text() { .unwrap() , &Value::String(expected_response.to_owned())); } + +#[actix_rt::test] +async fn well_formated_error_with_bad_request_params() { + let mut server = common::Server::with_uid("test"); + let query = "foo=bar"; + let (response, _status_code) = server.search(query).await; + assert!(response.get("message").is_some()); + assert!(response.get("errorCode").is_some()); + assert!(response.get("errorType").is_some()); + assert!(response.get("errorLink").is_some()); +}