Add IERC4906 interface and use in ERC721 (#4012)
Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const { BN, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
@ -38,6 +38,12 @@ contract('ERC721URIStorage', function (accounts) {
|
||||
expect(await this.token.tokenURI(firstTokenId)).to.be.equal(sampleUri);
|
||||
});
|
||||
|
||||
it('setting the uri emits an event', async function () {
|
||||
expectEvent(await this.token.$_setTokenURI(firstTokenId, sampleUri), 'MetadataUpdate', {
|
||||
_tokenId: firstTokenId,
|
||||
});
|
||||
});
|
||||
|
||||
it('reverts when setting for non existent token id', async function () {
|
||||
await expectRevert(
|
||||
this.token.$_setTokenURI(nonExistentTokenId, sampleUri),
|
||||
|
||||
Reference in New Issue
Block a user