Skip to content

Commit

Permalink
Refactor test to use verify
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
  • Loading branch information
hasufell and KtorZ committed Sep 9, 2020
1 parent 9b94966 commit 976cf99
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Cardano.Mnemonic
)
import Cardano.Wallet.Api.Types
( AddressAmount (..)
, ApiAddress
, ApiByronWallet
, ApiCoinSelection
, ApiNetworkInformation
Expand Down Expand Up @@ -470,11 +471,13 @@ spec = do
]
forM_ matrix $ \(title, addrPoolGap, expectations) -> it title $ \ctx -> do
let payload = payloadWith' "Secure Wallet" mnemonics24 (fromIntegral addrPoolGap)
r@(_, Right wallet) <- request @ApiWallet ctx (Link.postWallet @'Shelley) Default payload
verify r expectations
addrs <- listAddresses @n ctx wallet
length addrs `shouldBe` addrPoolGap

rW <- request @ApiWallet ctx (Link.postWallet @'Shelley) Default payload
verify rW expectations
rA <- request @[ApiAddress n] ctx
(Link.listAddresses @'Shelley (getFromResponse id rW)) Default Empty
verify rA
[ expectListSize addrPoolGap
]

it "WALLETS_CREATE_08 - default address_pool_gap" $ \ctx -> do
let payload = Json [json| {
Expand Down

0 comments on commit 976cf99

Please sign in to comment.