mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Merge pull request #535 from clark800/submit-error
Return promise error if submit result is an immediate failure
This commit is contained in:
@@ -155,6 +155,14 @@ describe('RippleAPI', function() {
|
||||
_.partial(checkResult, responses.submit, 'submit'));
|
||||
});
|
||||
|
||||
it('submit - failure', function() {
|
||||
return this.api.submit('BAD').then(() => {
|
||||
assert(false, 'Should throw RippleError');
|
||||
}).catch(error => {
|
||||
assert(error instanceof this.api.errors.RippleError);
|
||||
});
|
||||
});
|
||||
|
||||
it('getBalances', function() {
|
||||
return this.api.getBalances(address).then(
|
||||
_.partial(checkResult, responses.getBalances, 'getBalances'));
|
||||
|
||||
Reference in New Issue
Block a user