Skip to content

Commit 8c26851

Browse files
committed
Fix Response Debug assertions
This commit fixes the response debug assertions to verify that it contains the expected debug information (cherry picked from commit 08fdb0b)
1 parent 3b6ea09 commit 8c26851

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

elasticsearch/tests/client.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,9 @@ async fn search_with_body() -> Result<(), failure::Error> {
218218
assert_eq!(response.status_code(), StatusCode::OK);
219219
assert_eq!(response.method(), elasticsearch::http::Method::Post);
220220
let debug = format!("{:?}", &response);
221-
assert_eq!(
222-
format!("Response {{ method: Post, url: \"{}\", status_code: 200, headers: {{\"content-type\": \"application/json; charset=UTF-8\"}} }}",
223-
expected_url.as_str()),
224-
debug);
225-
221+
assert!(debug.contains("method"));
222+
assert!(debug.contains("status_code"));
223+
assert!(debug.contains("headers"));
226224
let response_body = response.json::<Value>().await?;
227225
assert!(response_body["took"].as_i64().is_some());
228226

0 commit comments

Comments
 (0)