Increase testing coverage (#1195)
* Added non-target bounty test * Increased ERC721 testing coverage. * Addressed review comments. * fix linter error * Fixed linter error * Removed unnecessary bouncer require * Improved Crowdsale tests. * Added missing SuperUser test. * Improved payment tests. * Improved token tests. * Fixed ERC721 test. * Reviewed phrasing.
This commit is contained in:
@ -7,6 +7,8 @@ require('chai')
|
||||
.should();
|
||||
|
||||
contract('Superuser', function ([_, firstOwner, newSuperuser, newOwner, anyone]) {
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
beforeEach(async function () {
|
||||
this.superuser = await Superuser.new({ from: firstOwner });
|
||||
});
|
||||
@ -27,6 +29,12 @@ contract('Superuser', function ([_, firstOwner, newSuperuser, newOwner, anyone])
|
||||
newSuperuserIsSuperuser.should.be.equal(true);
|
||||
});
|
||||
|
||||
it('should prevent changing to a null superuser', async function () {
|
||||
await expectThrow(
|
||||
this.superuser.transferSuperuser(ZERO_ADDRESS, { from: firstOwner })
|
||||
);
|
||||
});
|
||||
|
||||
it('should change owner after the superuser transfers the ownership', async function () {
|
||||
await this.superuser.transferSuperuser(newSuperuser, { from: firstOwner });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user