Closed BreD1810 closed 3 years ago
Merging #16 (6f4edf7) into master (1f412da) will increase coverage by
3.72%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #16 +/- ##
=========================================
+ Coverage 3.57% 7.29% +3.72%
=========================================
Files 17 18 +1
Lines 224 233 +9
=========================================
+ Hits 8 17 +9
Misses 216 216
Impacted Files | Coverage Δ | |
---|---|---|
src/endpoints/transactions.rs | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1f412da...6f4edf7. Read the comment docs.
is it possible to add some unit tests to show the deserialisation works? I would recommend grabbing the raw JSON from the API playground, anonymising it, and then showing that it's correctly deserialised.
you would have to extract the logic in the send
method into a function that you can unit test.
is it possible to add some unit tests to show the deserialisation works?
I've added (anonymised) unit tests for:
null
merchantTriple checked none of the identifying values are actual ones - just tried to keep them similar to actual values that may be returned.
I essentially used ascending numbers/letters for each value, making sure the digits were in the correct location as returned by the real response. Eg:
"id": "tx_0000A1aBC2Dbc34Ede5fEH",
brilliant work @BreD1810. Thanks again for the pull request!
This PR:
account_balance
field onTransaction
- although this is still shown on the Monzo doc examples, it does not appear to be returned by the API any more?Category
from an enum to aString
(as suggested in #12).MerchantInfo
anOption<String>
(the API can returnnull
values, for example with a top-up).