ElixirAuthMicrosoft.HTTPoisonMock (elixir_auth_microsoft v1.1.1)
A HTTPoison Mock that yields predictable results. Meant for testing.
Link to this section Summary
Link to this section Functions
Link to this function
get(url, list)
@spec get(any(), nonempty_maybe_improper_list()) :: {:error, :bad_request} | {:ok, %{body: binary()}}
Mocks the get/2
function from HTTPoison.
It yields a predictable result similar to Microsoft's JSON result when fetching the user info.
It raises an error when an invalid token is passed.
Link to this function
post(url, body, headers)
Mocks the post/3
function from HTTPoison.
It yields a predictable, with always the same access token.