Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that Tesla.Mock can be configured to return error tuples #473

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

bschmeck
Copy link
Contributor

@bschmeck bschmeck commented Jul 1, 2021

I wasn't able to find how to do this in the documentation, but it's supported by the call function. This PR adds an example to the Setting up mocks section of the docs.

I'm happy to rephrase things if "error tuple" is not the right term to use.

@teamon
Copy link
Member

teamon commented Jul 26, 2021

Thanks!

In fact, Tesla.Mock accepts multiple values for convenience:

https://github.com/teamon/tesla/blob/3549695c79d8aa77c734353bf502599c25ef4828/lib/tesla/mock.ex#L197-L211

@teamon teamon merged commit c723762 into elixir-tesla:master Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants