aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js')
-rw-r--r--ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js b/ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js
index f312896c4..bb7f3776c 100644
--- a/ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js
+++ b/ui/app/components/send_/account-list-item/tests/account-list-item-component.test.js
@@ -46,6 +46,17 @@ describe('AccountListItem Component', function () {
assert(wrapper.find('.mockClassName').hasClass('account-list-item'))
})
+ it('should call handleClick with the expected props when the root div is clicked', () => {
+ const { onClick } = wrapper.find('.mockClassName').props()
+ assert.equal(propsMethodSpies.handleClick.callCount, 0)
+ onClick()
+ assert.equal(propsMethodSpies.handleClick.callCount, 1)
+ assert.deepEqual(
+ propsMethodSpies.handleClick.getCall(0).args,
+ [{ address: 'mockAddress', name: 'mockName', balance: 'mockBalance' }]
+ )
+ })
+
it('should have a top row div', () => {
assert.equal(wrapper.find('.mockClassName > .account-list-item__top-row').length, 1)
assert(wrapper.find('.mockClassName > .account-list-item__top-row').is('div'))