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:
Nicolás Venturo
2018-08-14 19:37:30 -03:00
committed by GitHub
parent d51e38758e
commit 8d11dcc0e5
11 changed files with 404 additions and 241 deletions

View File

@ -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 });