diff options
Diffstat (limited to 'web-ui/test')
-rw-r--r-- | web-ui/test/unit/account_recovery/page.spec.js | 5 | ||||
-rw-r--r-- | web-ui/test/unit/common/footer/footer.spec.js | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/web-ui/test/unit/account_recovery/page.spec.js b/web-ui/test/unit/account_recovery/page.spec.js index 6a139167..6046c5d5 100644 --- a/web-ui/test/unit/account_recovery/page.spec.js +++ b/web-ui/test/unit/account_recovery/page.spec.js @@ -4,12 +4,11 @@ import React from 'react'; import { Page } from 'src/account_recovery/page'; describe('Page', () => { - let mockT; let page; beforeEach(() => { - mockT = key => key; - page = shallow(<Page t={mockT} />); + const mockTranslations = key => key; + page = shallow(<Page t={mockTranslations} />); }); it('renders backup email page title', () => { diff --git a/web-ui/test/unit/common/footer/footer.spec.js b/web-ui/test/unit/common/footer/footer.spec.js new file mode 100644 index 00000000..f1247233 --- /dev/null +++ b/web-ui/test/unit/common/footer/footer.spec.js @@ -0,0 +1,17 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { Footer } from 'src/common/footer/footer'; + +describe('Footer', () => { + let footer; + + beforeEach(() => { + const mockTranslations = key => key; + footer = shallow(<Footer t={mockTranslations} />); + }); + + it('renders the footer content', () => { + expect(footer.find('footer').text()).toContain('footer-text'); + }); +}); |