From cc1be96d3acb4df7d34828d4ba188b40eded82a4 Mon Sep 17 00:00:00 2001 From: jquense Date: Fri, 31 Jul 2015 13:04:23 -0400 Subject: [PATCH] add test for static backdrops --- test/ModalSpec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/ModalSpec.js b/test/ModalSpec.js index 1cb52812b2..99affa0485 100644 --- a/test/ModalSpec.js +++ b/test/ModalSpec.js @@ -99,6 +99,21 @@ describe('Modal', function () { ReactTestUtils.Simulate.click(dialog); }); + it('Should not close the modal when the "static" backdrop is clicked', function () { + let onHideSpy = sinon.spy(); + let instance = render( + + Message + + , mountPoint); + + let backdrop = React.findDOMNode(instance.refs.backdrop); + + ReactTestUtils.Simulate.click(backdrop); + + expect(onHideSpy).to.not.have.been.called; + }); + it('Should close the modal when the modal close button is clicked', function (done) { let doneOp = function () { done(); };