From 976cf9996d86f6f6d1295423c55fa0b2e10dbf85 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 9 Sep 2020 14:15:10 +0200 Subject: [PATCH] Refactor test to use verify Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com> --- .../Integration/Scenario/API/Shelley/Wallets.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Wallets.hs b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Wallets.hs index df792f455f2..6d7d7b9ed60 100644 --- a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Wallets.hs +++ b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Wallets.hs @@ -28,6 +28,7 @@ import Cardano.Mnemonic ) import Cardano.Wallet.Api.Types ( AddressAmount (..) + , ApiAddress , ApiByronWallet , ApiCoinSelection , ApiNetworkInformation @@ -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| {