summaryrefslogtreecommitdiffstats
path: root/test/app/inventory/Inventory.test.js
diff options
context:
space:
mode:
authorbogumil_zebek <bogumil.zebek@nokia.com>2019-02-11 13:04:55 +0100
committerZebek Bogumil <bogumil.zebek@nokia.com>2019-03-08 14:21:35 +0100
commiteec9820acfb269178e8f8c8bdc2ecfb2d13ad5f4 (patch)
tree4c43ebacabc91a467a87583f1aab1da3fa469e48 /test/app/inventory/Inventory.test.js
parent20d0dc060ba6b264b82a265c487d350e498a5135 (diff)
Add tests to Inventory module
Change-Id: I9a6b1749f80f8d4a4e28291e7f028bd7f864c86a Issue-ID: AAI-2143 Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Diffstat (limited to 'test/app/inventory/Inventory.test.js')
-rw-r--r--test/app/inventory/Inventory.test.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/app/inventory/Inventory.test.js b/test/app/inventory/Inventory.test.js
new file mode 100644
index 0000000..45b3450
--- /dev/null
+++ b/test/app/inventory/Inventory.test.js
@@ -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');
+ });
+
+});