Skip to content

Commit

Permalink
ON-787: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Apr 9, 2024
1 parent be6fe55 commit cc47d00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/OriumSftMarketplace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ describe('OriumSftMarketplace', () => {
it('Should accept a rental offer if duration is greater or equal minDuration', async () => {
rentalOffer.minDuration = duration / 2
rentalOffer.nonce = `0x${randomBytes(32).toString('hex')}`
await marketplace.connect(lender).createRentalOffer({ ...rentalOffer, commitmentId: BigNumber.from(0) })
rentalOffer.commitmentId = BigNumber.from(2)
await marketplace.connect(lender).createRentalOffer({ ...rentalOffer, commitmentId: BigInt(0) })
rentalOffer.commitmentId = BigInt(2)
await expect(marketplace.connect(borrower).acceptRentalOffer(rentalOffer, duration)).to.emit(
marketplace,
'RentalStarted',
Expand All @@ -476,8 +476,8 @@ describe('OriumSftMarketplace', () => {
it('Should NOT accept a rental offer if duration is less than minDuration', async () => {
rentalOffer.minDuration = duration
rentalOffer.nonce = `0x${randomBytes(32).toString('hex')}`
await marketplace.connect(lender).createRentalOffer({ ...rentalOffer, commitmentId: BigNumber.from(0) })
rentalOffer.commitmentId = BigNumber.from(2)
await marketplace.connect(lender).createRentalOffer({ ...rentalOffer, commitmentId: BigInt(0) })
rentalOffer.commitmentId = BigInt(2)
await expect(
marketplace.connect(borrower).acceptRentalOffer(rentalOffer, duration / 2),
).to.be.revertedWith('OriumSftMarketplace: Duration is less than the offer minimum duration')
Expand Down

0 comments on commit cc47d00

Please sign in to comment.