Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 53 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import expect from 'expect'; |
||
2 | |||
3 | import { |
||
4 | SHOW_MENU, |
||
5 | HIDE_MENU |
||
6 | } from './../../../../src/constants/ActionTypes'; |
||
7 | |||
8 | import { |
||
9 | showMenu, |
||
10 | hideMenu |
||
11 | } from './../../../../src/actions/plugins/actioncolumn/MenuActions'; |
||
12 | |||
13 | describe('The grid showMenu Action', () => { |
||
14 | |||
15 | it('Should return the correct hide menu response', () => { |
||
16 | |||
17 | const action = { |
||
18 | type: SHOW_MENU, |
||
19 | id: 'uniqueId', |
||
20 | stateKey: 'test-grid' |
||
21 | }; |
||
22 | |||
23 | expect(showMenu(action)) |
||
24 | .toEqual({ |
||
25 | type: SHOW_MENU, |
||
26 | id: 'uniqueId', |
||
27 | stateKey: 'test-grid' |
||
28 | }); |
||
29 | |||
30 | }); |
||
31 | |||
32 | }); |
||
33 | |||
34 | describe('The grid hideMenu Action', () => { |
||
35 | |||
36 | it('Should return the correct hide menu response', () => { |
||
37 | |||
38 | const action = { |
||
39 | type: HIDE_MENU, |
||
40 | id: 'uniqueId', |
||
41 | stateKey: 'test-grid' |
||
42 | }; |
||
43 | |||
44 | expect(hideMenu(action)) |
||
45 | .toEqual({ |
||
46 | type: HIDE_MENU, |
||
47 | id: 'uniqueId', |
||
48 | stateKey: 'test-grid' |
||
49 | }); |
||
50 | |||
51 | }); |
||
52 | |||
53 | }); |
||
54 | |||
55 |