ERC20Detailed.test.js 791 B

1234567891011121314151617181920212223242526272829
  1. const BigNumber = web3.BigNumber;
  2. require('chai')
  3. .use(require('chai-bignumber')(BigNumber))
  4. .should();
  5. const ERC20DetailedMock = artifacts.require('ERC20DetailedMock');
  6. contract('ERC20Detailed', function () {
  7. const _name = 'My Detailed ERC20';
  8. const _symbol = 'MDT';
  9. const _decimals = 18;
  10. beforeEach(async function () {
  11. this.detailedERC20 = await ERC20DetailedMock.new(_name, _symbol, _decimals);
  12. });
  13. it('has a name', async function () {
  14. (await this.detailedERC20.name()).should.be.equal(_name);
  15. });
  16. it('has a symbol', async function () {
  17. (await this.detailedERC20.symbol()).should.be.equal(_symbol);
  18. });
  19. it('has an amount of decimals', async function () {
  20. (await this.detailedERC20.decimals()).should.be.bignumber.equal(_decimals);
  21. });
  22. });