DetailedERC20.test.js 875 B

12345678910111213141516171819202122232425262728293031323334
  1. const BigNumber = web3.BigNumber;
  2. require('chai')
  3. .use(require('chai-bignumber')(BigNumber))
  4. .should();
  5. const DetailedERC20Mock = artifacts.require('DetailedERC20Mock');
  6. contract('DetailedERC20', accounts => {
  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 DetailedERC20Mock.new(_name, _symbol, _decimals);
  13. });
  14. it('has a name', async function () {
  15. const name = await detailedERC20.name();
  16. name.should.be.equal(_name);
  17. });
  18. it('has a symbol', async function () {
  19. const symbol = await detailedERC20.symbol();
  20. symbol.should.be.equal(_symbol);
  21. });
  22. it('has an amount of decimals', async function () {
  23. const decimals = await detailedERC20.decimals();
  24. decimals.should.be.bignumber.equal(_decimals);
  25. });
  26. });