# `MishkaPay.ProviderCase`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/provider_case.ex#L5)

The contract tests every provider passes, ours and a project's own. One line runs them:

    defmodule MyApp.Pay.AcmeTest do
      use MishkaPay.ProviderCase, provider: MyApp.Pay.Acme
    end

It checks that the module implements every required callback of `MishkaPay.Provider`, that its
id, label and capabilities are valid, that each capability has its operations, that a webhook nobody signed is refused, and that once its plugin starts, `MishkaPay.Provider`
finds it by its id (or lists it, when `offered?/0` keeps it out of the offered ones). Each stage
of Mishka Pay adds the contract of its operations here, so a provider written today is checked
against what tomorrow's calls expect.

It starts plugins, so the module is `async: false`; other `ExUnit.Case` options pass through.
Write the provider's own tests below the `use` line.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
