Skip to content

Commit a881ba3

Browse files
committed
rust: Nicer looking test
1 parent 91a2198 commit a881ba3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

rust/tests/it/wiremock_tests.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ async fn test_unknown_keys_are_ignored() {
141141
Mock::given(method("GET"))
142142
.and(path("/api/v1/app"))
143143
.respond_with(ResponseTemplate::new(200).set_body_string(json_body))
144+
.expect(1)
144145
.mount(&mock_server)
145146
.await;
146147

@@ -154,10 +155,5 @@ async fn test_unknown_keys_are_ignored() {
154155

155156
svx.application().list(None).await.unwrap();
156157

157-
let requests = mock_server
158-
.received_requests()
159-
.await
160-
.expect("we should have sent a request");
161-
162-
assert_eq!(1, requests.len());
158+
mock_server.verify().await;
163159
}

0 commit comments

Comments
 (0)