Migrate all ERC20 tests.

This commit is contained in:
Nicolás Venturo
2019-01-09 16:54:26 -03:00
parent 8b14d63670
commit d32d4c3773
10 changed files with 97 additions and 101 deletions

View File

@ -1,11 +1,8 @@
const shouldFail = require('../helpers/shouldFail');
const expectEvent = require('../helpers/expectEvent');
const { expectEvent, shouldFail } = require('openzeppelin-test-helpers');
const PausableMock = artifacts.require('PausableMock');
const { shouldBehaveLikePublicRole } = require('../access/roles/PublicRole.behavior');
require('../helpers/setup');
contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts]) {
beforeEach(async function () {
this.pausable = await PausableMock.new({ from: pauser });
@ -26,10 +23,10 @@ contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts
});
it('can perform normal process in non-pause', async function () {
(await this.pausable.count()).should.be.bignumber.equal(0);
(await this.pausable.count()).should.be.bignumber.equal('0');
await this.pausable.normalProcess({ from: anyone });
(await this.pausable.count()).should.be.bignumber.equal(1);
(await this.pausable.count()).should.be.bignumber.equal('1');
});
it('cannot take drastic measure in non-pause', async function () {
@ -89,9 +86,9 @@ contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts
});
it('should resume allowing normal process', async function () {
(await this.pausable.count()).should.be.bignumber.equal(0);
(await this.pausable.count()).should.be.bignumber.equal('0');
await this.pausable.normalProcess({ from: anyone });
(await this.pausable.count()).should.be.bignumber.equal(1);
(await this.pausable.count()).should.be.bignumber.equal('1');
});
it('should prevent drastic measure', async function () {