diff --git a/test/unit/components/email-confirmation-banner.test.jsx b/test/unit/components/email-confirmation-banner.test.jsx index 73a1006ef..fb796bd46 100644 --- a/test/unit/components/email-confirmation-banner.test.jsx +++ b/test/unit/components/email-confirmation-banner.test.jsx @@ -1,6 +1,7 @@ const React = require('react'); const {mountWithIntl} = require('../../helpers/intl-helpers.jsx'); const EmailConfirmationBanner = require('../../../src/components/dropdown-banner/email-confirmation/banner.jsx'); +jest.mock('../../../src/components/modal/email-confirmation/modal.jsx', () => () => 'MockEmailConfirmationModal'); describe('EmailConfirmationBanner', () => { @@ -9,9 +10,9 @@ describe('EmailConfirmationBanner', () => { ); + expect(component.text()).not.toContain('MockEmailConfirmationModal'); component.find('a.showEmailConfirmationModalLink').simulate('click'); - - expect(component.find('div.modal-content').exists()).toBe(true); + expect(component.text()).toContain('MockEmailConfirmationModal'); }); test('Clicking X calls onRequestDismiss', () => {