You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
727 B
30 lines
727 B
8 years ago
|
contract('PullPaymentCapable', function(accounts) {
|
||
|
|
||
|
it("can't call asyncSend externally", function(done) {
|
||
8 years ago
|
var ppc;
|
||
|
return PullPaymentCapableExample.new()
|
||
|
.then(function(ppc) {
|
||
|
assert.isUndefined(ppc.asyncSend);
|
||
|
})
|
||
|
.then(done);
|
||
8 years ago
|
});
|
||
|
|
||
|
it("can record an async payment correctly", function(done) {
|
||
|
var ppce;
|
||
8 years ago
|
var AMOUNT = 100;
|
||
8 years ago
|
return PullPaymentCapableExample.new()
|
||
|
.then(function(_ppce) {
|
||
|
ppce = _ppce;
|
||
|
ppce.callSend(accounts[0], AMOUNT)
|
||
|
})
|
||
|
.then(function() {
|
||
|
return ppce.payments(accounts[0]);
|
||
|
})
|
||
|
.then(function(paymentsToAccount0) {
|
||
|
assert.equal(paymentsToAccount0, AMOUNT);
|
||
|
})
|
||
|
.then(done);
|
||
|
});
|
||
|
|
||
|
});
|