feat: add ping endpoint with test infrastructure
Implement ping() method on OnspringClient. Set up wiremock-based test infrastructure with shared setup helper. Add tests for success and unauthorized scenarios verifying correct headers are sent.
This commit is contained in:
1 parent
7f2209af1c
commit
6735bca09f
4 files changed
+63
-1
No files matched your search
@@ -0,0 +1,10 @@
|
||||
use onspring::OnspringClient;
|
||||
use wiremock::MockServer;
|
||||
|
||||
pub async fn setup() -> (MockServer, OnspringClient) {
|
||||
let mock_server = MockServer::start().await;
|
||||
let client = OnspringClient::builder("test-api-key")
|
||||
.base_url(mock_server.uri())
|
||||
.build();
|
||||
(mock_server, client)
|
||||
}
|
||||
Reference in new issue
Block a user