Skip to content

Commit

Permalink
Add assertions for checking if deposit returned is shown correctly af…
Browse files Browse the repository at this point in the history
…ter quit tx is in ledger.
  • Loading branch information
Piotr Stachyra committed Feb 4, 2022
1 parent 7eef216 commit cd5f9db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
, expectField (#status . #getApiT) (`shouldBe` InLedger)
, expectField (#direction . #getApiT) (`shouldBe` Outgoing)
, expectField #depositTaken (`shouldBe` Quantity 1000000)
, expectField #depositReturned (`shouldBe` Quantity 0)
]

let txId = getFromResponse #id rJoin
Expand Down Expand Up @@ -414,6 +415,8 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
#amount (`shouldBe` quitFeeAmt)
, expectField
(#status . #getApiT) (`shouldBe` InLedger)
, expectField #depositTaken (`shouldBe` Quantity 0)
, expectField #depositReturned (`shouldBe` Quantity 1000000)
]

let epl = Link.listTransactions @'Shelley src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2434,6 +2434,14 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do
[ expectField #delegation (`shouldBe` notDelegating [])
]

-- transaction history shows deposit returned
rGetTx4 <- request @(ApiTransaction n) ctx queryTx3 Default Empty
verify rGetTx4
[ expectResponseCode HTTP.status200
, expectField #depositTaken (`shouldBe` Quantity 0)
, expectField #depositReturned (`shouldBe` depositAmt)
]

it "TRANS_NEW_JOIN_01b - Invalid pool id" $ \ctx -> runResourceT $ do

wa <- fixtureWallet ctx
Expand Down

0 comments on commit cd5f9db

Please sign in to comment.