mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-23 13:45:48 +00:00
Add unit test for submit
This commit is contained in:
@@ -19,6 +19,7 @@ const signInput = require('./fixtures/sign-input');
|
||||
const signOutput = require('./fixtures/sign-output');
|
||||
const MockPRNG = require('./mock-prng');
|
||||
const sjcl = require('../src').sjcl;
|
||||
const submitResponse = require('./fixtures/submit-response');
|
||||
|
||||
function checkResult(expected, done, error, response) {
|
||||
if (error) {
|
||||
@@ -74,6 +75,11 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('submit', function(done) {
|
||||
this.api.submit(signOutput.signedTransaction,
|
||||
_.partial(checkResult, submitResponse, done));
|
||||
});
|
||||
|
||||
it('getBalances', function(done) {
|
||||
this.api.getBalances(address, {},
|
||||
_.partial(checkResult, balancesResponse, done));
|
||||
|
||||
Reference in New Issue
Block a user