There was an error while loading. Please reload this page.
Sometimes it might be handy to fake 200 OK response (or any other) for all requests to one service in tests (for example metrics/analytics services).
200 OK
Instead of setting up mock for every test you can use a static adapter:
# lib/myapp/adapters/static.ex defmodule MyApp.Adapters.Static do def call(_env, :ok), do: {:ok, %Tesla.Env{status: 200}} end # config/test.exs config :tesla, MyApp.MyStatsClient, adapter: {MyApp.Adapters.Static, :ok}