Implement test for expirations

This commit is contained in:
Rene Vergara 2022-05-17 16:30:46 -05:00
parent b3482da312
commit 8bb94b824a
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -105,8 +105,6 @@ main =
res <- httpJSON req
height (getResponseBody (res :: Response Block)) `shouldSatisfy` \x ->
x > 1600000
describe "unconfirmed Zcash txs" $ do
it "returns txs with less than 2 confirmations" $ do pending
describe "User endpoint" $ do
it "returns a user for a session" $ do
req <-
@ -308,6 +306,20 @@ main =
let ownerPaid = maybe False opaid s
ownerPaid `shouldBe` True
_ -> True `shouldBe` False `debug` "Failed parsing payment"
it "owners are expired" $ \p -> do
_ <- expireOwners p "test"
now <- getCurrentTime
res <-
access
p
master
"test"
(rest =<<
find
(select
["expiration" =: ["$lt" =: now], "paid" =: True]
"owners"))
res `shouldBe` []
it "login txs are converted to users" $ \p -> do
let myTx =
ZGoTx