blob: ae55653dbabd5db7dda880cb3fee501a7c29ea4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import { shallow } from 'enzyme';
import expect from 'expect';
import React from 'react';
import InputField from 'src/common/input_field/input_field';
describe('InputField', () => {
let inputField;
beforeEach(() => {
inputField = shallow(<InputField label='Email' name='email' />);
});
it('renders an input of type text for email', () => {
expect(inputField.find('TextField').props().name).toEqual('email');
});
it('renders a label for the email', () => {
expect(inputField.find('TextField').props().floatingLabelText).toEqual('Email');
});
});
|