mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-25 06:35:48 +00:00
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:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user