-
Notifications
You must be signed in to change notification settings - Fork 6
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
Freeze httpoison jason issue #45 #48
Freeze httpoison jason issue #45 #48
Conversation
Use a keyword list instead of a map to preserve order. Also use interpolation in test expectations for readability
Usage is just one case of post/3 and one case of get/2, so it's unlikely that httpoison's interface will change for this usage
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 34 34
=========================================
Hits 34 34 ☔ View full report in Codecov by Sentry. |
Thank you so much for the PR @cheerfulstoic ❤️ . We're merging this and publishing the app ASAP so you won't have any more problems. Regarding mocking, I agree that we could go with
Regardless, I've updated the demo and added a note about this in the README. Again, thank you so much for the PR, it's really appreciated :D |
Awesome, thank you! I've updated and I can use the latest |
Hey! Following up from here. Sorry for the delay 😄
This PR is mainly about the version changes in
mix.exs
, but I needed to fix some things in the tests to get the tests running on my machine, so those changes are here too.I didn't do anything with
dependabot
because I suspect that if you use>=
instead of~>
then dependably won't ever suggest changes, or if it does it will only suggest changes to yourmix.lock
file, which doesn't change your package dependencies for users of the library.What I did:
It looks like you’re just using the
post/3
andget/2
functions fromhttpoison
. The earliest docs I could find forhttpoison
go back to 0.6.1:https://hexdocs.pm/httpoison/0.6.1/index.html
The order of the arguments seems to be the same, and when I force the version to be
0.6.1
inmix.exs
the tests pass. Though it would be worth testing 0.6.1 without the mock because the mock gives a static interface. It’s maybe worth using a library likemox
which will complain when your mock differs from the actual implementation’s behavior (probably for later 😊)The
jason
library was easier because while it’s used three times, two of those times are in the HTTPoison mock. Thelib
usage was just aJason.decode/1
which isn’t likely to every break. I tested freezingjason
in place at version 1.0.0 and it worked fine, so I made that the lowest allowed version.