Migrate all ERC20 tests.
This commit is contained in:
@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user