diff --git a/contracts/mocks/ERC721ASpotMock.sol b/contracts/mocks/ERC721ASpotMock.sol index 4e8a2518..af341485 100644 --- a/contracts/mocks/ERC721ASpotMock.sol +++ b/contracts/mocks/ERC721ASpotMock.sol @@ -38,10 +38,6 @@ contract ERC721ASpotMock is StartTokenIdHelper, SequentialUpToHelper, ERC721AQue _safeMintSpot(to, tokenId); } - function getOwnershipAt(uint256 index) public view returns (TokenOwnership memory) { - return _ownershipAt(index); - } - function totalSpotMinted() public view returns (uint256) { return _totalSpotMinted(); } diff --git a/test/extensions/ERC721ASpot.test.js b/test/extensions/ERC721ASpot.test.js index e6452fb4..5c858560 100644 --- a/test/extensions/ERC721ASpot.test.js +++ b/test/extensions/ERC721ASpot.test.js @@ -231,30 +231,38 @@ describe('ERC721ASpot', function () { expect(await this.erc721aSpot.totalBurned()).to.eq(7); }); + it('affects _exists', async function () { + expect(await this.erc721aSpot.exists(0)).to.eq(false); + expect(await this.erc721aSpot.exists(9)).to.eq(false); + expect(await this.erc721aSpot.exists(10)).to.eq(true); + + expect(await this.erc721aSpot.exists(20)).to.eq(true); + + await this.erc721aSpot.connect(this.addr1).burn(20); + expect(await this.erc721aSpot.exists(20)).to.eq(false); + + this.erc721aSpot.safeMintSpot(this.owner.address, 20); + expect(await this.erc721aSpot.exists(20)).to.eq(true); + }); + it('forwards extraData after burn and re-mint', async function () { await this.erc721aSpot.setExtraDataAt(20, 123); let explicitOwnership = await this.erc721aSpot.explicitOwnershipOf(20); - expect(await this.erc721aSpot.exists(20)).to.eq(true); expect(explicitOwnership.addr).to.eq(this.addr1.address); expect(explicitOwnership.burned).to.eq(false); expect(explicitOwnership.extraData).to.eq(123); - expect(await this.erc721aSpot.exists(20)).to.eq(true); await this.erc721aSpot.connect(this.addr1).burn(20); - expect(await this.erc721aSpot.exists(20)).to.eq(false); explicitOwnership = await this.erc721aSpot.explicitOwnershipOf(20); expect(explicitOwnership.addr).to.eq(this.addr1.address); expect(explicitOwnership.burned).to.eq(true); expect(explicitOwnership.extraData).to.eq(123); - expect(await this.erc721aSpot.exists(20)).to.eq(false); this.erc721aSpot.safeMintSpot(this.owner.address, 20); - expect(await this.erc721aSpot.exists(20)).to.eq(true); explicitOwnership = await this.erc721aSpot.explicitOwnershipOf(20); expect(explicitOwnership.addr).to.eq(this.owner.address); expect(explicitOwnership.burned).to.eq(false); expect(explicitOwnership.extraData).to.eq(123); - expect(await this.erc721aSpot.exists(20)).to.eq(true); }); }); });