Fix pathfind queuing and add unit test

This commit is contained in:
Chris Clark
2015-09-29 11:25:02 -07:00
parent b8bb191d24
commit 5217b66396
3 changed files with 28 additions and 15 deletions

View File

@@ -570,6 +570,18 @@ describe('RippleAPI', function() {
_.partial(checkResult, responses.getPaths.XrpToUsd, 'getPaths'));
});
it('getPaths - queuing', function() {
return Promise.all([
this.api.getPaths(requests.getPaths.normal),
this.api.getPaths(requests.getPaths.UsdToUsd),
this.api.getPaths(requests.getPaths.XrpToXrp)
]).then(results => {
checkResult(responses.getPaths.XrpToUsd, 'getPaths', results[0]);
checkResult(responses.getPaths.UsdToUsd, 'getPaths', results[1]);
checkResult(responses.getPaths.XrpToXrp, 'getPaths', results[2]);
});
});
// @TODO
// need decide what to do with currencies/XRP:
// if add 'XRP' in currencies, then there will be exception in