summaryrefslogtreecommitdiff
path: root/web-ui/src/common/flat_button/flat_button.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/src/common/flat_button/flat_button.spec.js')
-rw-r--r--web-ui/src/common/flat_button/flat_button.spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/src/common/flat_button/flat_button.spec.js b/web-ui/src/common/flat_button/flat_button.spec.js
new file mode 100644
index 00000000..500eb8fb
--- /dev/null
+++ b/web-ui/src/common/flat_button/flat_button.spec.js
@@ -0,0 +1,20 @@
+import { shallow } from 'enzyme';
+import expect from 'expect';
+import React from 'react';
+import FlatButton from 'src/common/flat_button/flat_button';
+
+describe('FlatButton', () => {
+ let flatButton;
+
+ beforeEach(() => {
+ flatButton = shallow(<FlatButton buttonText='Logout' fontIconClass='fa fa-sign-out' />);
+ });
+
+ it('renders a FlatButton of type submit with text logout', () => {
+ expect(flatButton.find('FlatButton').props().label).toEqual('Logout');
+ });
+
+ it('renders a FlatButton with given fontIcon class', () => {
+ expect(flatButton.find('FlatButton').props().icon.props.className).toEqual('fa fa-sign-out');
+ });
+});