Merge "Add tests to Inventory module"
[aai/sparky-fe.git] / test / app / inventory / Inventory.test.js
diff --git a/test/app/inventory/Inventory.test.js b/test/app/inventory/Inventory.test.js
new file mode 100644 (file)
index 0000000..45b3450
--- /dev/null
@@ -0,0 +1,30 @@
+import React from 'react';
+import thunk from 'redux-thunk';
+
+import configureMockStore from 'redux-mock-store';
+import expect from 'expect';
+
+import Inventory from 'app/inventory/Inventory';
+import {shallow} from 'enzyme';
+
+
+const mockStore = configureMockStore([thunk]);
+const store = mockStore({inventoryReducer: {}});
+
+describe('Inventory component', () => {
+
+  fetch = require('jest-fetch-mock');
+
+  it('should be rendered', () => {
+
+    // when
+    let wrapper = shallow(
+        <Inventory store={store}/>
+    );
+
+    // then
+    let actual = wrapper.render().text();
+    expect(actual).toInclude('Active Inventory');
+  });
+
+});