mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Add getTrustlines and unit test
This commit is contained in:
@@ -24,6 +24,7 @@ const submitResponse = require('./fixtures/submit-response');
|
||||
const transactionResponse = require('./fixtures/transaction-response');
|
||||
const accountTransactionsResponse =
|
||||
require('./fixtures/account-transactions-response');
|
||||
const trustlinesResponse = require('./fixtures/trustlines-response');
|
||||
|
||||
function checkResult(expected, done, error, response) {
|
||||
if (error) {
|
||||
@@ -99,4 +100,10 @@ describe('RippleAPI', function() {
|
||||
this.api.getAccountTransactions(address, options,
|
||||
_.partial(checkResult, accountTransactionsResponse, done));
|
||||
});
|
||||
|
||||
it('getTrustlines', function(done) {
|
||||
const options = {currency: 'USD'};
|
||||
this.api.getTrustlines(address, options,
|
||||
_.partial(checkResult, trustlinesResponse, done));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user