Add getAccountObjects (#881)

Squashed commit of the following:

commit 361ead8cbbbe4fa25ecba614f8f11930ff679996
commit 5ff26d7d2defbbaaa7c50d6b3b5b74bf30be19ef
commit 97f5dfc86d4730082fd016197b0c025e499912e3
commit d48654098601f2a19484d9bbae7c65786e3c5dd4
commit 4790401123e7836f6bea8d03111bce60dcf95114
commit 57512f7fc000689bb8224f33173ba91221f27281
commit e75a7e95b11368b26c40e8e6e7b583d978475e95
This commit is contained in:
Elliot Lee
2018-04-11 14:37:37 -07:00
committed by GitHub
parent 9af3968508
commit e978ef1888
19 changed files with 1275 additions and 32 deletions

View File

@@ -1201,6 +1201,33 @@ describe('RippleAPI', function () {
});
});
it('getAccountObjects', function () {
return this.api.getAccountObjects(address).then(response =>
checkResult(responses.getAccountObjects, 'AccountObjectsResponse', response));
});
it('getAccountObjects - invalid options', function () {
// Intentionally no local validation of these options
return this.api.getAccountObjects(address, {invalid: 'options'}).then(response =>
checkResult(responses.getAccountObjects, 'AccountObjectsResponse', response));
});
it('request account_objects', function () {
return this.api._request('account_objects', {
account: address
}).then(response =>
checkResult(responses.getAccountObjects, 'AccountObjectsResponse', response));
});
it('request account_objects - invalid options', function () {
// Intentionally no local validation of these options
return this.api._request('account_objects', {
account: address,
invalid: 'options'
}).then(response =>
checkResult(responses.getAccountObjects, 'AccountObjectsResponse', response));
});
it('getOrders', function () {
return this.api.getOrders(address).then(
_.partial(checkResult, responses.getOrders, 'getOrders'));