Files
onspring-api-sdk-rust/tests/common/mod.rs
T
Stevan Freeborn 6735bca09f 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.
2026-03-25 13:35:52 -05:00

11 lines
301 B
Rust

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)
}