@ -27,12 +27,11 @@ contract('ERC721Burnable', function (accounts) {
|
||||
|
||||
describe('burn', function () {
|
||||
const tokenId = firstTokenId;
|
||||
let logs = null;
|
||||
let receipt = null;
|
||||
|
||||
describe('when successful', function () {
|
||||
beforeEach(async function () {
|
||||
const result = await this.token.burn(tokenId, { from: owner });
|
||||
logs = result.logs;
|
||||
receipt = await this.token.burn(tokenId, { from: owner });
|
||||
});
|
||||
|
||||
it('burns the given token ID and adjusts the balance of the owner', async function () {
|
||||
@ -44,7 +43,7 @@ contract('ERC721Burnable', function (accounts) {
|
||||
});
|
||||
|
||||
it('emits a burn event', async function () {
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
expectEvent(receipt, 'Transfer', {
|
||||
from: owner,
|
||||
to: ZERO_ADDRESS,
|
||||
tokenId: tokenId,
|
||||
@ -55,8 +54,7 @@ contract('ERC721Burnable', function (accounts) {
|
||||
describe('when there is a previous approval burned', function () {
|
||||
beforeEach(async function () {
|
||||
await this.token.approve(approved, tokenId, { from: owner });
|
||||
const result = await this.token.burn(tokenId, { from: owner });
|
||||
logs = result.logs;
|
||||
receipt = await this.token.burn(tokenId, { from: owner });
|
||||
});
|
||||
|
||||
context('getApproved', function () {
|
||||
|
||||
Reference in New Issue
Block a user