summaryrefslogtreecommitdiff
path: root/web-ui/src/common/back_link/back_link.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/src/common/back_link/back_link.spec.js')
-rw-r--r--web-ui/src/common/back_link/back_link.spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/src/common/back_link/back_link.spec.js b/web-ui/src/common/back_link/back_link.spec.js
new file mode 100644
index 00000000..ee659267
--- /dev/null
+++ b/web-ui/src/common/back_link/back_link.spec.js
@@ -0,0 +1,20 @@
+import { shallow } from 'enzyme';
+import expect from 'expect';
+import React from 'react';
+import BackLink from 'src/common/back_link/back_link';
+
+describe('BackLink', () => {
+ let backLink;
+
+ beforeEach(() => {
+ backLink = shallow(<BackLink text='Back to inbox' href='/' />);
+ });
+
+ it('renders link with text', () => {
+ expect(backLink.find('a').text()).toEqual('Back to inbox');
+ });
+
+ it('adds link action', () => {
+ expect(backLink.find('a').props().href).toEqual('/');
+ });
+});