Does not allow to create bounty contract without address

This commit is contained in:
Makoto Inoue
2016-10-28 11:22:41 +01:00
parent 9509298622
commit b6a5830047
3 changed files with 18 additions and 2 deletions

View File

@ -33,6 +33,18 @@ contract('Bounty', function(accounts) {
then(done);
})
it("cannot create bounty without address", function(done){
var target = SecureTargetMock.deployed();
Bounty.new().
then(function(bounty){
throw {name : "NoThrowError", message : "should not come here"};
}).
catch(function(error){
assert.notEqual(error.name, "NoThrowError");
}).
then(done);
})
it("empties itself when killed", function(done){
var target = SecureTargetMock.deployed();
var owner = accounts[0];