Coffrify. Testing. Fixtures
(Coffrify v0.9.0)
View Source
Minimal but realistic response fixtures for tests. All builders accept a map of overrides that is shallow-merged into the default.
Summary
Functions
Build an API-key fixture (without the secret value).
Build a transfer fixture.
Build a webhook fixture.
Build a Coffrify webhook event envelope.
Build a Standard Webhooks-style header set for a given event id and ts.
Functions
Build an API-key fixture (without the secret value).
Build a transfer fixture.
Build a webhook fixture.
Build a Coffrify webhook event envelope.
Example
event = Coffrify.Testing.Fixtures.webhook_event("transfer.created", %{
"transfer" => Coffrify.Testing.Fixtures.transfer()
})
@spec webhook_headers(String.t(), String.t() | integer(), String.t()) :: [ {String.t(), String.t()} ]
Build a Standard Webhooks-style header set for a given event id and ts.