Bobbin.TestHost (bobbin v0.5.1)

Copy Markdown View Source

A Bobbin.Host for an integration's own tests, so they run without Heddle.

It returns the credentials a test puts in :bobbin, :test_credentials, by name:

Application.put_env(:bobbin, :host, Bobbin.TestHost)
Application.put_env(:bobbin, :test_credentials, %{"main" => %{"token" => "t"}})

A credential can be a function of the options too, to try an OAuth renewal: fn opts -> ... end. Or name a module in :bobbin, :credentials_client whose fetch(workspace_id, name, kind), and fetch/4 with options, answers.