From cde5ec52a8804a6be193ef4a04ad7e4d930507f5 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Tue, 17 Sep 2019 16:18:10 -0700 Subject: [PATCH] Remove test that breaks `npm test` (no artifact) --- migrations/2_contract_migrations.js | 5 ----- test/Ownable.test.js | 34 ----------------------------- 2 files changed, 39 deletions(-) delete mode 100644 migrations/2_contract_migrations.js delete mode 100644 test/Ownable.test.js diff --git a/migrations/2_contract_migrations.js b/migrations/2_contract_migrations.js deleted file mode 100644 index a3be069..0000000 --- a/migrations/2_contract_migrations.js +++ /dev/null @@ -1,5 +0,0 @@ -const ownableFactory = artifacts.require('Ownable.sol') - -module.exports = async deployer => { - await deployer.deploy(ownableFactory) -} diff --git a/test/Ownable.test.js b/test/Ownable.test.js deleted file mode 100644 index 96bedae..0000000 --- a/test/Ownable.test.js +++ /dev/null @@ -1,34 +0,0 @@ -const { shouldFail } = require('openzeppelin-test-helpers') - -const Ownable = artifacts.require('Ownable') - -contract('Ownable', accounts => { - let ownable - - beforeEach(async () => { - ownable = await Ownable.new() - }) - - it('should have an owner', async () => { - const owner = await ownable.owner() - assert.isTrue(owner !== 0) - }) - - it('changes owner after transfer', async () => { - const other = accounts[1] - await ownable.transferOwnership(other) - const owner = await ownable.owner() - - assert.isTrue(owner === other) - }) - - it('should prevent non-owners from transfering', async () => { - const other = accounts[2] - const owner = await ownable.owner.call() - assert.isTrue(owner !== other) - await shouldFail.reverting.withMessage( - ownable.transferOwnership(other, { from: other }), - "Only owner accessible" - ); - }) -})