ERC20Detailed.test.js 849 B

12345678910111213141516171819202122232425262728
  1. const { contract } = require('@openzeppelin/test-environment');
  2. const { BN } = require('@openzeppelin/test-helpers');
  3. const { expect } = require('chai');
  4. const ERC20DetailedMock = contract.fromArtifact('ERC20DetailedMock');
  5. describe('ERC20Detailed', function () {
  6. const _name = 'My Detailed ERC20';
  7. const _symbol = 'MDT';
  8. const _decimals = new BN(18);
  9. beforeEach(async function () {
  10. this.detailedERC20 = await ERC20DetailedMock.new(_name, _symbol, _decimals);
  11. });
  12. it('has a name', async function () {
  13. expect(await this.detailedERC20.name()).to.equal(_name);
  14. });
  15. it('has a symbol', async function () {
  16. expect(await this.detailedERC20.symbol()).to.equal(_symbol);
  17. });
  18. it('has an amount of decimals', async function () {
  19. expect(await this.detailedERC20.decimals()).to.be.bignumber.equal(_decimals);
  20. });
  21. });