write ownable simple test
This commit is contained in:
@ -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) {
|
|||||||
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);
|
||||||
};
|
};
|
||||||
|
|||||||
11
test/ownable.js
Normal file
11
test/ownable.js
Normal 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)
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user