From 1547000d1c63257659c09b79019dd5114c26d08b Mon Sep 17 00:00:00 2001 From: Steve Ellis Date: Sun, 13 Nov 2016 16:49:05 -0500 Subject: [PATCH] move Ownable tests away from migration fixtures --- test/Ownable.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/Ownable.js b/test/Ownable.js index 83ae4b93e..8663da9ee 100644 --- a/test/Ownable.js +++ b/test/Ownable.js @@ -1,6 +1,13 @@ contract('Ownable', function(accounts) { + var ownable; + + beforeEach(function() { + return Ownable.new().then(function(deployed) { + ownable = deployed; + }); + }); + it("should have an owner", function(done) { - var ownable = Ownable.deployed(); return ownable.owner() .then(function(owner) { assert.isTrue(owner != 0); @@ -9,7 +16,6 @@ contract('Ownable', function(accounts) { }); it("changes owner after transfer", function(done) { - var ownable = Ownable.deployed(); var other = accounts[1]; return ownable.transfer(other) .then(function() { @@ -22,7 +28,6 @@ contract('Ownable', function(accounts) { }); it("should prevent non-owners from transfering" ,function(done) { - var ownable = Ownable.deployed(); var other = accounts[2]; return ownable.transfer(other, {from: accounts[2]}) .then(function() {