Commit 825203fc by Manuel Araoz

write ownable simple test

parent 10ba1f66
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Base contract with an owner * Base contract with an owner
*/ */
contract Ownable { contract Ownable {
address owner; address public owner;
function Ownable() { function Ownable() {
owner = msg.sender; owner = msg.sender;
......
...@@ -2,5 +2,6 @@ module.exports = function(deployer) { ...@@ -2,5 +2,6 @@ module.exports = function(deployer) {
deployer.deploy(PullPaymentBid); deployer.deploy(PullPaymentBid);
deployer.deploy(BadArrayUse); deployer.deploy(BadArrayUse);
deployer.deploy(Bounty); deployer.deploy(Bounty);
deployer.deploy(Ownable);
deployer.deploy(LimitFunds); deployer.deploy(LimitFunds);
}; };
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)
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment