Closed cleverca22 closed 4 years ago
@cleverca22 Please, add CHANGELOG.md entry under Unreleased
in Features
section (the section does not exist - needs to be created). Could you also add Fixes
section below for the existed entry?
So to have:
Unreleased
Features
Fixes
@KtorZ without some chain state to fire up the wallet, i don't know how to test this endpoint fully in an automated manner
all other review comments should be good
@cleverca22 For the testing, have a look at some integration test scenarios (e.g. https://github.com/input-output-hk/cardano-sl/blob/develop/wallet/test/integration/Test/Integration/Scenario/Wallets.hs#L579-L601)
You should be able to do something like:
scenario "Can query wallet id and balance using only its mnemonic" $
fixture <- setup $ defaultSetup
& initialCoins .~ [14]
successfulRequest $ Client.deleteWallet
$- (fixture ^. wallet . walletId)
response <- request $ Client.calculateMnemonic
$- (fixture ^. backupPhrase)
$- (Just True)
verify response
[ expectFieldEqual walletId (fixture ^. wallet . walletId)
, expectFieldEqual maybeBalance (Just 14)
]
+/- the compilation errors and testing with various scenarios (with the query parameter, without, testing on a wallet with no funds etc ..)
bors r+
:-1: Rejected by too few approved reviews
bors r+
Description
Linked issue
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)
How to merge
Send the message
bors r+
to merge this PR. For more information, seedocs/how-to/bors.md
.