aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/tests/send-component.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send_/tests/send-component.test.js')
-rw-r--r--ui/app/components/send_/tests/send-component.test.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/components/send_/tests/send-component.test.js b/ui/app/components/send_/tests/send-component.test.js
index c82edd971..4e33d8f63 100644
--- a/ui/app/components/send_/tests/send-component.test.js
+++ b/ui/app/components/send_/tests/send-component.test.js
@@ -32,8 +32,8 @@ describe('Send Component', function () {
wrapper = shallow(<SendTransactionScreen
amount={'mockAmount'}
amountConversionRate={'mockAmountConversionRate'}
+ blockGasLimit={'mockBlockGasLimit'}
conversionRate={10}
- data={'mockData'}
editingTransactionId={'mockEditingTransactionId'}
from={ { address: 'mockAddress', balance: 'mockBalance' } }
gasLimit={'mockGasLimit'}
@@ -42,6 +42,7 @@ describe('Send Component', function () {
history={{ mockProp: 'history-abc'}}
network={'3'}
primaryCurrency={'mockPrimaryCurrency'}
+ recentBlocks={['mockBlock']}
selectedAddress={'mockSelectedAddress'}
selectedToken={'mockSelectedToken'}
tokenBalance={'mockTokenBalance'}
@@ -207,15 +208,24 @@ describe('Send Component', function () {
assert.deepEqual(
propsMethodSpies.updateAndSetGasTotal.getCall(0).args[0],
{
- data: 'mockData',
+ blockGasLimit: 'mockBlockGasLimit',
editingTransactionId: 'mockEditingTransactionId',
gasLimit: 'mockGasLimit',
gasPrice: 'mockGasPrice',
+ recentBlocks: ['mockBlock'],
selectedAddress: 'mockSelectedAddress',
selectedToken: 'mockSelectedToken',
+ to: undefined,
+ value: 'mockAmount',
}
)
})
+
+ it('should call updateAndSetGasTotal with to set to lowercase if passed', () => {
+ propsMethodSpies.updateAndSetGasTotal.resetHistory()
+ wrapper.instance().updateGas({ to: '0xABC' })
+ assert.equal(propsMethodSpies.updateAndSetGasTotal.getCall(0).args[0].to, '0xabc')
+ })
})
describe('render', () => {