Add more tests of getFee (#897)

This commit is contained in:
Elliot Lee
2018-07-25 01:53:27 -07:00
committed by GitHub
parent 860f6a6cd8
commit 14704eee6b
3 changed files with 25 additions and 4 deletions

View File

@@ -1853,6 +1853,23 @@ describe('RippleAPI', function () {
address, requests.preparePayment.normal, instructions).then(
_.partial(checkResult, expectedResponse, 'prepare'));
});
it('getFee custom cushion', function () {
this.api._feeCushion = 1.4;
return this.api.getFee().then(fee => {
assert.strictEqual(fee, '0.000014');
});
});
// This is not recommended since it may result in attempting to pay
// less than the base fee. However, this test verifies
// the existing behavior.
it('getFee cushion less than 1.0', function () {
this.api._feeCushion = 0.9;
return this.api.getFee().then(fee => {
assert.strictEqual(fee, '0.000009');
});
});
it('disconnect & isConnected', function () {
assert.strictEqual(this.api.isConnected(), true);