* added _safeTransferFrom function * added safeMint functions * added package-lock.json for consistency, don't know why it changes * added initial suggestions/modifications * change _safeTransferFrom to internal, reverted package-lock.json to original, and changed ERC721Pausable to override _transferFrom instead of transferFrom * included tests for safeMint functions * modified safeMint tests to be on ERC721Mock contract * added safeMint to ERC721Mintable & respective test to ERC721MintBurn.behavior.js
This commit is contained in:
committed by
Francisco Giordano
parent
571fa7f4e7
commit
377431bc4c
@ -13,6 +13,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
|
||||
const thirdTokenId = new BN(3);
|
||||
const unknownTokenId = new BN(4);
|
||||
const MOCK_URI = 'https://example.com';
|
||||
const data = '0x42';
|
||||
|
||||
describe('like a mintable and burnable ERC721', function () {
|
||||
beforeEach(async function () {
|
||||
@ -72,6 +73,18 @@ function shouldBehaveLikeMintAndBurnERC721 (
|
||||
});
|
||||
});
|
||||
|
||||
describe('safeMint', function () {
|
||||
it('it can safely mint with data', async function () {
|
||||
await this.token.methods['safeMint(address,uint256,bytes)'](...[newOwner, thirdTokenId, data],
|
||||
{ from: minter });
|
||||
});
|
||||
|
||||
it('it can safely mint without data', async function () {
|
||||
await this.token.methods['safeMint(address,uint256)'](...[newOwner, thirdTokenId],
|
||||
{ from: minter });
|
||||
});
|
||||
});
|
||||
|
||||
describe('burn', function () {
|
||||
const tokenId = firstTokenId;
|
||||
let logs = null;
|
||||
|
||||
Reference in New Issue
Block a user