Skip to content

Commit

Permalink
test: add test for approval for all in lsp8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
skimaharvey committed Aug 15, 2023
1 parent 4e87923 commit 6d73bc2
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,16 @@ export const shouldBehaveLikeLSP8CompatibleERC721 = (
.setApprovalForAll(context.accounts.operator.address, true);
});

it('should be able to set approval for operator', async () => {
const tx = await context.lsp8CompatibleERC721
.connect(context.accounts.operator)
.approve(context.accounts.anyone.address, tokenIds[0]);

await expect(tx)
.to.emit(context.lsp8CompatibleERC721, 'Approval')
.withArgs(context.accounts.owner.address, context.accounts.anyone.address, tokenIds[0]);
});

describe('when calling setApprovalForAll with true', () => {
it('should revert when trying to pass caller address as operator', async () => {
await expect(
Expand Down

0 comments on commit 6d73bc2

Please sign in to comment.