-
Notifications
You must be signed in to change notification settings - Fork 56
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
How do I test it? #15
Comments
@chungwong you can follow these guidelines http://blog.plataformatec.com.br/2015/10/mocks-and-explicit-contracts/ |
@chungwong and anyone coming here in the future. The library now uses exvcr for testing. All the fixtures are included in the repo so testing is as easy as |
@ericdude4 but this is only for the internal tests of this package, right? This does not help me, when I use this package in my application and I want to test my integration is working. How would I test this? |
@niklasmoeller Yes, this is for the internal tests of the package. If you include this package in your application and write tests, it will make live requests to the Mailchimp API. For this reason, I would recommend using exvcr for your testing as well - unless you want the tests to always make live requests to the Mailchimp API 🤷♂ |
Another option is to replace Httpoison with Tesla and use provided |
Thanks @ericdude4. I will take a look into exvcr. This could be a good solution for this and other cases, too. |
Say I have the following setup in
config/test.exs
for every test, it is making a real call to Mailchimp. Is there a way to prevent it from sending real requests to Mailchimp?
The text was updated successfully, but these errors were encountered: