Skip to content

Commit

Permalink
more getTransaction testing
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed May 29, 2023
1 parent 74a7164 commit 3fdd372
Showing 1 changed file with 29 additions and 0 deletions.
Expand Up @@ -2096,6 +2096,35 @@ spec = describe "SHARED_TRANSACTIONS" $ do
[ expectField #delegation (`shouldBe` delegating (ApiT pool2) [])
]

eventually "Party1's wallet has joined another pool" $ do
rJoin' <- request @(ApiTransaction n) ctx
(Link.getTransaction @'Shared party1
(getFromResponse Prelude.id submittedTx3))
Default Empty
verify rJoin'
[ expectResponseCode HTTP.status200
, expectField (#status . #getApiT) (`shouldBe` InLedger)
, expectField (#direction . #getApiT) (`shouldBe` Outgoing)
, expectField #depositTaken (`shouldBe` Quantity 0)
, expectField #depositReturned (`shouldBe` Quantity 0)
, expectField #certificates
(`shouldBe` [ delegatingCert2 stakeKeyDerPathParty1])
]
eventually "Party2's wallet has joined another pool" $ do
rJoin' <- request @(ApiTransaction n) ctx
(Link.getTransaction @'Shared party2
(getFromResponse Prelude.id submittedTx3))
Default Empty
verify rJoin'
[ expectResponseCode HTTP.status200
, expectField (#status . #getApiT) (`shouldBe` InLedger)
, expectField (#direction . #getApiT) (`shouldBe` Outgoing)
, expectField #depositTaken (`shouldBe` Quantity 0)
, expectField #depositReturned (`shouldBe` Quantity 0)
, expectField #certificates
(`shouldBe` [ delegatingCert2 stakeKeyDerPathParty2])
]

-- there's currently no withdrawals in the wallet
rw1 <- request @[ApiTransaction n] ctx
(Link.listTransactions' @'Shared party1 (Just 1)
Expand Down

0 comments on commit 3fdd372

Please sign in to comment.