DetailedERC20.test.js 800 B

12345678910111213141516171819202122232425262728293031
  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. let detailedERC20 = null;
  8. const _name = 'My Detailed ERC20';
  9. const _symbol = 'MDT';
  10. const _decimals = 18;
  11. beforeEach(async function () {
  12. detailedERC20 = await ERC20DetailedMock.new(_name, _symbol, _decimals);
  13. });
  14. it('has a name', async function () {
  15. (await detailedERC20.name()).should.be.equal(_name);
  16. });
  17. it('has a symbol', async function () {
  18. (await detailedERC20.symbol()).should.be.equal(_symbol);
  19. });
  20. it('has an amount of decimals', async function () {
  21. (await detailedERC20.decimals()).should.be.bignumber.equal(_decimals);
  22. });
  23. });