write ownable simple test

This commit is contained in:
Manuel Araoz
2016-09-12 19:16:37 -07:00
parent 10ba1f6620
commit 825203fcec
3 changed files with 13 additions and 1 deletions

View File

@ -3,7 +3,7 @@
* Base contract with an owner
*/
contract Ownable {
address owner;
address public owner;
function Ownable() {
owner = msg.sender;

View File

@ -2,5 +2,6 @@ module.exports = function(deployer) {
deployer.deploy(PullPaymentBid);
deployer.deploy(BadArrayUse);
deployer.deploy(Bounty);
deployer.deploy(Ownable);
deployer.deploy(LimitFunds);
};

11
test/ownable.js Normal file
View File

@ -0,0 +1,11 @@
contract('Ownable', function(accounts) {
it("should have an owner", function(done) {
var ownable = Ownable.deployed();
return ownable.owner()
.then(function(owner) {
assert.isTrue(owner != 0);
})
.then(done)
});
});