From 8b921dc6ecca92511a024583b0837614ca926e1a Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Fri, 30 Sep 2016 18:51:42 -0300 Subject: [PATCH] fix pullpaymentcapable test --- .../examples}/PullPaymentCapableExample.sol | 2 +- test/PullPaymentCapable.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) rename {test => contracts/examples}/PullPaymentCapableExample.sol (83%) diff --git a/test/PullPaymentCapableExample.sol b/contracts/examples/PullPaymentCapableExample.sol similarity index 83% rename from test/PullPaymentCapableExample.sol rename to contracts/examples/PullPaymentCapableExample.sol index e467f09da..1925d69d6 100644 --- a/test/PullPaymentCapableExample.sol +++ b/contracts/examples/PullPaymentCapableExample.sol @@ -1,4 +1,4 @@ -import '../contracts/PullPaymentCapable.sol'; +import '../PullPaymentCapable.sol'; // Example class using PullPaymentCapable contract PullPaymentCapableExample is PullPaymentCapable { diff --git a/test/PullPaymentCapable.js b/test/PullPaymentCapable.js index 92c41a3d0..161d1c896 100644 --- a/test/PullPaymentCapable.js +++ b/test/PullPaymentCapable.js @@ -1,14 +1,17 @@ contract('PullPaymentCapable', function(accounts) { it("can't call asyncSend externally", function(done) { - var ppc = PullPaymentCapable.new(); - assert.isUndefined(ppc.asyncSend); - done(); + var ppc; + return PullPaymentCapableExample.new() + .then(function(ppc) { + assert.isUndefined(ppc.asyncSend); + }) + .then(done); }); it("can record an async payment correctly", function(done) { var ppce; - var AMOUNT = 1000; + var AMOUNT = 100; return PullPaymentCapableExample.new() .then(function(_ppce) { ppce = _ppce;