Files
openzeppelin-contracts/test/drafts/ERC1046/ERC20Metadata.test.js
Yohann Pereira 489d2e85f1 Replace chai.should with chai.expect (#1780)
* changed exxpect to expect wherever applicable

* Merged with latest branch

* Updated merkleTree helper to latest master branch

* Made linting fixes

* Fix for test build

* updated for Coverage

* Updated Address.test.js

* Undo package-lock changes.
2019-06-24 17:40:05 -03:00

26 lines
742 B
JavaScript

require('openzeppelin-test-helpers');
const ERC20MetadataMock = artifacts.require('ERC20MetadataMock');
const { expect } = require('chai');
const metadataURI = 'https://example.com';
describe('ERC20Metadata', function () {
beforeEach(async function () {
this.token = await ERC20MetadataMock.new(metadataURI);
});
it('responds with the metadata', async function () {
expect(await this.token.tokenURI()).to.equal(metadataURI);
});
describe('setTokenURI', function () {
it('changes the original URI', async function () {
const newMetadataURI = 'https://betterexample.com';
await this.token.setTokenURI(newMetadataURI);
expect(await this.token.tokenURI()).to.equal(newMetadataURI);
});
});
});