-
Notifications
You must be signed in to change notification settings - Fork 31
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
22 credential model form #43
Conversation
Codecov Report
@@ Coverage Diff @@
## main #43 +/- ##
==========================================
- Coverage 79.49% 71.51% -7.98%
==========================================
Files 34 42 +8
Lines 278 323 +45
==========================================
+ Hits 221 231 +10
- Misses 57 92 +35
Continue to review full report at Codecov.
|
@stuartc don't review yet. I need to add more tests. mix verify didn't warn me about those tho. |
c544f25
to
5ce7dd0
Compare
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 added a note about why CodeCov thinks coerce_json_field
isn't fully covered.
I don't see any live tests for Credentials, I suggest copying dataclip or job live tests and adapting them to Credentials - a big strange as I thought the generator would have created the tests for you (they did for me); perhaps theres a flag we have to use...
name: "Sadio Mane", | ||
stats: "goals:126, teams: Metz, Liverpool" | ||
} | ||
end |
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.
In order to cover the cases that CodeCov is flagging, there are three other cases:
- The key doesn't exist i.e.
coerce_json_field(%{"foo" => 1}, "bar")
- The key does exist and is
nil
i.e.coerce_json_field(%{"foo" => nil}, "foo")
- The key does exist and is not a string (
any
) i.e.coerce_json_field(%{"foo" => 1}, "foo")
Even though CodeCov does think the first two are covered, we aren't specifically testing it. The third example is the one it's flagging.
Could you add examples for the above scenarios, all of them result in a 'unmodified' map.
This PR closes #22 and #23.