Fix: Emit error events and return error on pathfind

This commit is contained in:
Alan Cohen
2015-08-20 11:47:33 -07:00
committed by Chris Clark
parent ba6c703163
commit 1ccbaf6776
21 changed files with 129 additions and 66 deletions

View File

@@ -391,7 +391,7 @@ describe('RippleAPI', function() {
return this.api.getTransactions(address, options).then(() => {
assert(false, 'Should throw RippleError');
}).catch(error => {
assert(error instanceof common.core.RippleError);
assert(error instanceof this.api.errors.RippleError);
});
});
@@ -552,6 +552,14 @@ describe('RippleAPI', function() {
});
});
it('getPaths - error: srcActNotFound', function() {
const pathfind = _.assign({}, requests.getPaths.normal,
{source: {address: addresses.NOTFOUND}});
return this.api.getPaths(pathfind).catch(error => {
assert(error instanceof this.api.errors.RippleError);
});
});
it('getLedgerVersion', function() {
assert.strictEqual(this.api.getLedgerVersion(), 8819951);
});