From a98c5b8865ada33885212824d076711590ff5947 Mon Sep 17 00:00:00 2001 From: Makoto Inoue Date: Sat, 22 Oct 2016 17:27:46 +0100 Subject: [PATCH] Add bounty test to test against checkInvarient --- contracts/Bounty.sol | 4 ++++ test/Bounty.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/Bounty.js diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index 3f8bf8d4a..d6945df65 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.sol @@ -23,6 +23,10 @@ contract Bounty is PullPayment { return target; } + function checkInvarient() returns(bool){ + return true; + } + function claim(SimpleToken target) { address researcher = researchers[target]; if (researcher == 0) throw; diff --git a/test/Bounty.js b/test/Bounty.js new file mode 100644 index 000000000..4cb3e0325 --- /dev/null +++ b/test/Bounty.js @@ -0,0 +1,14 @@ +contract('Bounty', function(accounts) { + it.only("create target", function(done){ + var bounty = Bounty.deployed(); + + bounty.createTarget(). + then(function() { + return bounty.checkInvarient.call() + }). + then(function(result) { + assert.isTrue(result); + }). + then(done); + }) +});