aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
diff options
context:
space:
mode:
authorThomas <thomas.b.huang@gmail.com>2018-06-19 03:37:01 +0800
committerThomas <thomas.b.huang@gmail.com>2018-06-19 03:37:01 +0800
commitea0dcdd3124ec65d3145f0ac7790a6172603d88c (patch)
treeb071efe391d00f40805bb36a5c0f137eca14b8b7 /ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
parentef31eeccb244592aa17dd677e854e106c9bb5848 (diff)
parentd910c35e90d0d725e86b7743538b6c6c429f26f0 (diff)
downloadtangerine-wallet-browser-ea0dcdd3124ec65d3145f0ac7790a6172603d88c.tar.gz
tangerine-wallet-browser-ea0dcdd3124ec65d3145f0ac7790a6172603d88c.tar.zst
tangerine-wallet-browser-ea0dcdd3124ec65d3145f0ac7790a6172603d88c.zip
Merge branch 'develop' into v4.8.0
Diffstat (limited to 'ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js')
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js b/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
index 2205579ca..579e18585 100644
--- a/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
+++ b/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
@@ -12,10 +12,12 @@ const propsMethodSpies = {
setMaxModeTo: sinon.spy(),
updateSendAmount: sinon.spy(),
updateSendAmountError: sinon.spy(),
+ updateGas: sinon.spy(),
}
sinon.spy(SendAmountRow.prototype, 'updateAmount')
sinon.spy(SendAmountRow.prototype, 'validateAmount')
+sinon.spy(SendAmountRow.prototype, 'updateGas')
describe('SendAmountRow Component', function () {
let wrapper
@@ -36,6 +38,7 @@ describe('SendAmountRow Component', function () {
tokenBalance={'mockTokenBalance'}
updateSendAmount={propsMethodSpies.updateSendAmount}
updateSendAmountError={propsMethodSpies.updateSendAmountError}
+ updateGas={propsMethodSpies.updateGas}
/>, { context: { t: str => str + '_t' } })
instance = wrapper.instance()
})
@@ -139,8 +142,14 @@ describe('SendAmountRow Component', function () {
assert.equal(primaryCurrency, 'mockPrimaryCurrency')
assert.deepEqual(selectedToken, { address: 'mockTokenAddress' })
assert.equal(value, 'mockAmount')
+ assert.equal(SendAmountRow.prototype.updateGas.callCount, 0)
assert.equal(SendAmountRow.prototype.updateAmount.callCount, 0)
onBlur('mockNewAmount')
+ assert.equal(SendAmountRow.prototype.updateGas.callCount, 1)
+ assert.deepEqual(
+ SendAmountRow.prototype.updateGas.getCall(0).args,
+ ['mockNewAmount']
+ )
assert.equal(SendAmountRow.prototype.updateAmount.callCount, 1)
assert.deepEqual(
SendAmountRow.prototype.updateAmount.getCall(0).args,