blob: 88983f4f0c3f13abf636b408a18a4cb3592a4ddc (
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('input[type="text"]').props().name).toEqual('email')
})
it('renders a label for the email', () => {
expect(inputField.find('label').text()).toEqual('Email')
})
})
|