diff options
Diffstat (limited to 'web-ui/test/unit/common')
-rw-r--r-- | web-ui/test/unit/common/footer/footer.spec.js | 17 | ||||
-rw-r--r-- | web-ui/test/unit/common/header/header.spec.js | 17 |
2 files changed, 34 insertions, 0 deletions
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'); + }); +}); diff --git a/web-ui/test/unit/common/header/header.spec.js b/web-ui/test/unit/common/header/header.spec.js new file mode 100644 index 00000000..82e29e1c --- /dev/null +++ b/web-ui/test/unit/common/header/header.spec.js @@ -0,0 +1,17 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { Header } from 'src/common/header/header'; + +describe('Header', () => { + let header; + + beforeEach(() => { + const mockTranslations = key => key; + header = shallow(<Header t={mockTranslations} />); + }); + + it('renders the header content', () => { + expect(header.find('header').text()).toContain('logout'); + }); +}); |