diff options
author | Anike Arni <anikarni@gmail.com> | 2017-02-08 13:51:11 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 13:51:11 -0200 |
commit | a1c384cebd80e177389ef79c2de6400db986aaa6 (patch) | |
tree | 7d2e14fbf931fd50769510bfc5809f41e5c48dbf /web-ui/test/unit | |
parent | 48e5acd386123a06586c20bf192fc18b5471da13 (diff) | |
parent | aa26a47abac48d817a04a4f2375f1378767fa83c (diff) |
Merge pull request #964 from pixelated/backup-email-page
Refactoring react code
Diffstat (limited to 'web-ui/test/unit')
-rw-r--r-- | web-ui/test/unit/account_recovery/page.spec.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/web-ui/test/unit/account_recovery/page.spec.js b/web-ui/test/unit/account_recovery/page.spec.js new file mode 100644 index 00000000..590d1de8 --- /dev/null +++ b/web-ui/test/unit/account_recovery/page.spec.js @@ -0,0 +1,25 @@ +import { shallow } from 'enzyme' +import expect from 'expect' +import React from 'react' +import { Page } from 'src/account_recovery/page' + +describe('Page', () => { + let mockT, page + + beforeEach(() => { + mockT = (key) => (key) + page = shallow(<Page t={mockT}/>) + }) + + it('renders backup email page title', () => { + expect(page.find('h1').text()).toEqual('backup-account.title') + }) + + it('renders backup account email input field', () => { + expect(page.find('InputField').props().name).toEqual('email') + }) + + it('renders backup account submit button', () => { + expect(page.find('SubmitButton').props().buttonText).toEqual('backup-account.button') + }) +}) |