Skip to content

Commit

Permalink
integration test - part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Aug 31, 2023
1 parent 16a006a commit 8298420
Showing 1 changed file with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import Cardano.Wallet.Api.Types
, ApiEra (..)
, ApiExternalCertificate (..)
, ApiNetworkInformation
, ApiPolicyId
, ApiPolicyId (..)
, ApiPolicyKey (..)
, ApiRegisterPool (..)
, ApiSerialisedTransaction (..)
Expand Down Expand Up @@ -1166,8 +1166,8 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do
[ RequireSignatureOf policyKeyHash
]

addrs <- listAddresses @n ctx wb
let destination = (addrs !! 1) ^. #id
addrsDest <- listAddresses @n ctx wb
let destination = (addrsDest !! 1) ^. #id
let payload = Json [json|{
"reference_policy_script_template":
{ "all": [ "cosigner#0" ] },
Expand Down Expand Up @@ -1232,6 +1232,37 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do
verify rGet
[ expectResponseCode HTTP.status202
]
let (ApiPolicyId (ApiT policyId')) = getFromResponse Prelude.id rGet

eventually "wb wallet has received funds" $ do
request @ApiWallet ctx (Link.getWallet @'Shelley wb) Default Empty
>>= flip verify
[ expectField
(#balance . #available)
(.> (Quantity 0))
]

addrsMint <- listAddresses @n ctx wa
let addrMint = (addrsMint !! 1) ^. #id
let payloadMint = Json [json|{
"mint_burn": [{
"policy_id": #{toText policyId'},
"reference_input": #{toJSON refInp},
"asset_name": "ab12",
"operation":
{ "mint" :
{ "receiving_address": #{addrMint},
"quantity": 1000
}
}
}]
}|]

rTxMint <- request @(ApiConstructTransaction n) ctx
(Link.createUnsignedTransaction @'Shelley wa) Default payloadMint
verify rTxMint
[ expectResponseCode HTTP.status202
]


it "TRANS_NEW_VALIDITY_INTERVAL_01a - \
Expand Down

0 comments on commit 8298420

Please sign in to comment.