| Total Complexity | 3 |
| Complexity/F | 1 |
| Lines of Code | 47 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | import expect from 'expect'; |
||
| 2 | |||
| 3 | import { |
||
| 4 | REMOVE_TOOLBAR |
||
| 5 | } from './../../../../src/constants/ActionTypes'; |
||
| 6 | |||
| 7 | import { |
||
| 8 | removeToolbar |
||
| 9 | } from './../../../../src/actions/plugins/bulkactions/ToolbarActions'; |
||
| 10 | |||
| 11 | describe('The grid removeToolbar Action', () => { |
||
| 12 | |||
| 13 | it('Should remove the toolbar', () => { |
||
| 14 | |||
| 15 | const action = { |
||
| 16 | type: REMOVE_TOOLBAR, |
||
| 17 | state: true, |
||
| 18 | stateKey: 'test-grid' |
||
| 19 | }; |
||
| 20 | |||
| 21 | expect(removeToolbar(action)) |
||
| 22 | .toEqual({ |
||
| 23 | type: REMOVE_TOOLBAR, |
||
| 24 | value: true, |
||
| 25 | stateKey: 'test-grid' |
||
| 26 | }); |
||
| 27 | |||
| 28 | }); |
||
| 29 | |||
| 30 | it('Should show the toolbar', () => { |
||
| 31 | |||
| 32 | const action = { |
||
| 33 | type: REMOVE_TOOLBAR, |
||
| 34 | state: false, |
||
| 35 | stateKey: 'test-grid' |
||
| 36 | }; |
||
| 37 | |||
| 38 | expect(removeToolbar(action)) |
||
| 39 | .toEqual({ |
||
| 40 | type: REMOVE_TOOLBAR, |
||
| 41 | value: false, |
||
| 42 | stateKey: 'test-grid' |
||
| 43 | }); |
||
| 44 | |||
| 45 | }); |
||
| 46 | |||
| 47 | }); |
||
| 48 |