Remove unused `setBaseURI` tests (#5456)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
pull/5443/head
Renan Souza 7 days ago committed by GitHub
parent 7ae222bf2f
commit 6e752dc169
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 26
      test/token/ERC721/ERC721.behavior.js

@ -10,7 +10,6 @@ const firstTokenId = 5042n;
const secondTokenId = 79217n; const secondTokenId = 79217n;
const nonExistentTokenId = 13n; const nonExistentTokenId = 13n;
const fourthTokenId = 4n; const fourthTokenId = 4n;
const baseURI = 'https://api.example.com/v1/';
const RECEIVER_MAGIC_VALUE = '0x150b7a02'; const RECEIVER_MAGIC_VALUE = '0x150b7a02';
@ -936,31 +935,6 @@ function shouldBehaveLikeERC721Metadata(name, symbol) {
.to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken')
.withArgs(nonExistentTokenId); .withArgs(nonExistentTokenId);
}); });
describe('base URI', function () {
beforeEach(function () {
if (!this.token.interface.hasFunction('setBaseURI')) {
this.skip();
}
});
it('base URI can be set', async function () {
await this.token.setBaseURI(baseURI);
expect(await this.token.baseURI()).to.equal(baseURI);
});
it('base URI is added as a prefix to the token URI', async function () {
await this.token.setBaseURI(baseURI);
expect(await this.token.tokenURI(firstTokenId)).to.equal(baseURI + firstTokenId.toString());
});
it('token URI can be changed by changing the base URI', async function () {
await this.token.setBaseURI(baseURI);
const newBaseURI = 'https://api.example.com/v2/';
await this.token.setBaseURI(newBaseURI);
expect(await this.token.tokenURI(firstTokenId)).to.equal(newBaseURI + firstTokenId.toString());
});
});
}); });
}); });
} }

Loading…
Cancel
Save