write ownable simple test

pull/14/head
Manuel Araoz 8 years ago
parent 10ba1f6620
commit 825203fcec
  1. 2
      contracts/Ownable.sol
  2. 1
      migrations/2_deploy_contracts.js
  3. 11
      test/ownable.js

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

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

@ -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)
});
});
Loading…
Cancel
Save