Skip to content

Commit

Permalink
write ownable simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
maraoz committed Sep 13, 2016
1 parent 10ba1f6 commit 825203f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/Ownable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Base contract with an owner
*/
contract Ownable {
address owner;
address public owner;

function Ownable() {
owner = msg.sender;
Expand Down
1 change: 1 addition & 0 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = function(deployer) {
deployer.deploy(PullPaymentBid);
deployer.deploy(BadArrayUse);
deployer.deploy(Bounty);
deployer.deploy(Ownable);
deployer.deploy(LimitFunds);
};
11 changes: 11 additions & 0 deletions test/ownable.js
Original file line number Diff line number Diff line change
@@ -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)

});
});

0 comments on commit 825203f

Please sign in to comment.