aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modal/tests/modal.component.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/modal/tests/modal.component.test.js')
-rw-r--r--ui/app/components/modal/tests/modal.component.test.js16
1 files changed, 1 insertions, 15 deletions
diff --git a/ui/app/components/modal/tests/modal.component.test.js b/ui/app/components/modal/tests/modal.component.test.js
index 31457751f..8cce1a808 100644
--- a/ui/app/components/modal/tests/modal.component.test.js
+++ b/ui/app/components/modal/tests/modal.component.test.js
@@ -88,6 +88,7 @@ describe('Modal Component', () => {
onSubmit={handleSubmit}
submitText="Submit"
headerText="My Header"
+ onClose={handleCancel}
/>
)
@@ -99,19 +100,4 @@ describe('Modal Component', () => {
assert.equal(handleCancel.callCount, 1)
assert.equal(handleSubmit.callCount, 0)
})
-
- it('should call onSubmit when onCancel is undefined and the header close button is clicked', () => {
- const handleSubmit = sinon.spy()
- const wrapper = shallow(
- <Modal
- onSubmit={handleSubmit}
- submitText="Submit"
- headerText="My Header"
- />
- )
-
- assert.equal(handleSubmit.callCount, 0)
- wrapper.find('.modal-container__header-close').simulate('click')
- assert.equal(handleSubmit.callCount, 1)
- })
})