update market test

This commit is contained in:
Eric Mastro 2022-09-20 17:17:40 +10:00 committed by Eric Mastro
parent 38643c9709
commit a7277e90fb
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import pkg/chronos
import pkg/ethers/testing
import codex/contracts
import codex/contracts/testtoken
import stew/byteutils # delete me
@ -180,8 +181,9 @@ ethersuite "On-Chain Market":
let subscription = await market.subscribeRequestCancelled(request.id, onRequestCancelled)
await provider.advanceTimeTo(request.expiry) # shares expiry with otherRequest
expect ValueError:
await market.withdrawFunds(otherRequest.id)
check:
revertsWith "Invalid client address":
await market.withdrawFunds(otherRequest.id)
check receivedIds.len == 0
await market.withdrawFunds(request.id)
check receivedIds == @[request.id]