Implement tokensByIndex extension

- Remove restrictions from mock mint and burn calls
This commit is contained in:
Santiago Palladino
2018-03-09 12:58:16 -03:00
parent d726c79e5f
commit 54a1d2eacc
8 changed files with 184 additions and 60 deletions

View File

@ -138,13 +138,13 @@ export default function shouldBehaveLikeERC721BasicToken (accounts) {
});
it('adjusts owners tokens by index', async function () {
if (!this.token.tokensOfOwnerByIndex) return;
if (!this.token.tokenOfOwnerByIndex) return;
const newOwnerToken = await this.tokensOfOwnerByIndex(this.to, 0);
newOwnerToken.should.be.equal(tokenId);
const newOwnerToken = await this.token.tokenOfOwnerByIndex(this.to, 0);
newOwnerToken.toNumber().should.be.equal(tokenId);
const previousOwnerToken = await this.tokensOfOwnerByIndex(owner, 0);
previousOwnerToken.should.not.be.equal(tokenId);
const previousOwnerToken = await this.token.tokenOfOwnerByIndex(owner, 0);
previousOwnerToken.toNumber().should.not.be.equal(tokenId);
});
};