-
Notifications
You must be signed in to change notification settings - Fork 43
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
Export TestDouble issue #35 #36
Conversation
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 16 17 +1
=========================================
+ Hits 16 17 +1
Continue to review full report at Codecov.
|
…or clarity in stack trace #35
use Mix.Config | ||
|
||
if Mix.env() == :test do | ||
config :elixir_auth_google, httpoison: ElixirAuthGoogle.HTTPoison.InMemory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've in-lined this in the lib/elixir_auth_google.ex @httpoison
module attribute so we don't need the file. 👍 #35
@SimonLab this was easier than I thought. |
No further changes required. Got it working in my Auth PR: dwyl/auth#43 ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
As discussed in #35 I'm not a fan of having to duplicate Mock versions of the OAuth functions.
This PR introduces a transparent TestDouble which means the
Auth
App (and any other people) using this module no longer need to think about Mocking the requests.I think this will greatly improve the UX and our maintainability.
TestDouble
) for Export TestDouble Function in Hex Package #35