From b5469310a1baaf6f7e0ed372d2f0527afd9e8c33 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/bounties/SimpleTokenBounty.sol | 4 ++++ test/Bounty.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/Bounty.js diff --git a/contracts/bounties/SimpleTokenBounty.sol b/contracts/bounties/SimpleTokenBounty.sol index 4b54ded6d..6f61f7496 100644 --- a/contracts/bounties/SimpleTokenBounty.sol +++ b/contracts/bounties/SimpleTokenBounty.sol @@ -23,6 +23,10 @@ contract SimpleTokenBounty 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); + }) +});