Browse Source

fix pullpaymentcapable test

Manuel Araoz 9 years ago
parent
commit
8b921dc6ec
2 changed files with 8 additions and 5 deletions
  1. 1 1
      contracts/examples/PullPaymentCapableExample.sol
  2. 7 4
      test/PullPaymentCapable.js

+ 1 - 1
test/PullPaymentCapableExample.sol → contracts/examples/PullPaymentCapableExample.sol

@@ -1,4 +1,4 @@
-import '../contracts/PullPaymentCapable.sol';
+import '../PullPaymentCapable.sol';
 
 // Example class using PullPaymentCapable
 contract PullPaymentCapableExample is PullPaymentCapable {

+ 7 - 4
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;