mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
c07702330d
* Moving entityGetter to utility folder * Import whitespace and if statement braces * newlines between multi-line if's
23 lines
710 B
JavaScript
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}.`);
|
|
});
|
|
});
|
|
|