There was an error while loading. Please reload this page.
1 parent c411812 commit 8fd64c9Copy full SHA for 8fd64c9
1 file changed
pact_mock_server/src/builder.rs
@@ -514,13 +514,17 @@ ZSwZXle550Ns2jdFLpdSoFOHWsbPbsILG6ZXTlG9sJIZwujoYQ==
514
let response = client.get(format!("https://127.0.0.1:{}", mock_server.port()).as_str())
515
.header(ACCEPT, "application/json")
516
.send()
517
- .await;
+ .await?
518
+ .error_for_status()
519
+ .unwrap();
520
+ let status = response.status();
521
+ let _body = response.text().await;
522
523
let all_matched = mock_server.all_matched();
524
let mismatches = mock_server.mismatches();
525
mock_server.shutdown().unwrap();
526
- expect!(response.unwrap().status()).to(be_equal_to(200));
527
+ expect!(status).to(be_equal_to(200));
528
expect!(all_matched).to(be_true());
529
expect!(mismatches).to(be_equal_to(vec![]));
530
0 commit comments