fleet/frontend/pages/ForgotPasswordPage/ForgotPasswordPage.tests.jsx
Mike Arpaia c07702330d Cleaning JavaScript imports and if statements (#327)
* Moving entityGetter to utility folder

* Import whitespace and if statement braces

* newlines between multi-line if's
2016-10-19 16:22:18 -04:00

23 lines
710 B
JavaScript

import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import { ForgotPasswordPage } from './ForgotPasswordPage';
describe('ForgotPasswordPage - component', () => {
it('renders the ForgotPasswordForm when there is no email prop', () => {
const page = mount(<ForgotPasswordPage />);
expect(page.find('ForgotPasswordForm').length).toEqual(1);
});
it('renders the email sent text when the email prop is present', () => {
const email = 'hi@thegnar.co';
const page = mount(<ForgotPasswordPage email={email} />);
expect(page.find('ForgotPasswordForm').length).toEqual(0);
expect(page.text()).toInclude(`An email was sent to ${email}.`);
});
});