Skip to content

Commit

Permalink
add custom checks
Browse files Browse the repository at this point in the history
  • Loading branch information
YouStillAlive committed Jun 24, 2024
1 parent 8f376c3 commit 600095c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/LockDealNFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('LockDealNFT', function () {
await expect(lockDealNFT.connect(notOwner).renounceOwnership()).to.be.revertedWithCustomError(
lockDealNFT,
"OwnableUnauthorizedAccount"
);;
);
});

it('should revert the same transfer status', async () => {
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('LockDealNFT', function () {
// Try to transfer the token without any approval. This should fail.
await expect(
lockDealNFT.connect(anotherAddress).transferFrom(initialOwner.address, newOwner.address, tokenId),
).to.be.revertedWith('ERC721: transfer caller is not owner nor approved');
).to.be.revertedWith('Pool transfer not approved by user');
});

it('should set provider', async () => {
Expand Down Expand Up @@ -285,7 +285,7 @@ describe('LockDealNFT', function () {
lockDealNFT
.connect(notOwner)
['safeTransferFrom(address,address,uint256,bytes)'](receiver.address, lockDealNFT.address, poolId, packedData),
).to.be.revertedWith('ERC721: caller is not token owner or approved');
).to.be.revertedWithCustomError(lockDealNFT, "ERC721InsufficientApproval");
});

it('should refresh all metadata', async () => {
Expand Down

0 comments on commit 600095c

Please sign in to comment.