aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/__tests__/ducks/ui.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-06-28 23:16:18 -0700
committerGitHub <noreply@github.com>2016-06-28 23:16:18 -0700
commitb7430c0775fd14df779b6d0a27f189d3bfbd8194 (patch)
tree2b1db1801c7de989080a06bd886a680d304c88e9 /web/src/js/__tests__/ducks/ui.js
parent3b53d3e393f30879420b4407583c42bb1f51563e (diff)
parent37c2b47c26dea9b143b2720761cdce21dafd3884 (diff)
downloadmitmproxy-b7430c0775fd14df779b6d0a27f189d3bfbd8194.tar.gz
mitmproxy-b7430c0775fd14df779b6d0a27f189d3bfbd8194.tar.bz2
mitmproxy-b7430c0775fd14df779b6d0a27f189d3bfbd8194.zip
Merge pull request #1296 from gzzhanghao/test
[web] add tests for ducks/utils
Diffstat (limited to 'web/src/js/__tests__/ducks/ui.js')
-rw-r--r--web/src/js/__tests__/ducks/ui.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/src/js/__tests__/ducks/ui.js b/web/src/js/__tests__/ducks/ui.js
index 44a71aa3..2388a9ad 100644
--- a/web/src/js/__tests__/ducks/ui.js
+++ b/web/src/js/__tests__/ducks/ui.js
@@ -1,9 +1,9 @@
jest.unmock("../../ducks/ui");
// @todo fix it ( this is why I don't like to add tests until our architecture is stable :P )
-jest.unmock("../../ducks/flows");
+jest.unmock("../../ducks/views/main");
import reducer, { setActiveMenu } from '../../ducks/ui';
-import { SELECT_FLOW } from '../../ducks/flows';
+import { SELECT } from '../../ducks/views/main';
describe("ui reducer", () => {
it("should return the initial state", () => {
@@ -14,21 +14,21 @@ describe("ui reducer", () => {
}),
it("should change the state to Start when deselecting a flow and we a currently at the flow tab", () => {
expect(reducer({activeMenu: 'Flow'},
- { type: SELECT_FLOW,
+ { type: SELECT,
currentSelection: '1',
flowId : undefined
})).toEqual({ activeMenu: 'Start'})
}),
it("should change the state to Flow when we selected a flow and no flow was selected before", () => {
expect(reducer({activeMenu: 'Start'},
- { type: SELECT_FLOW,
+ { type: SELECT,
currentSelection: undefined,
flowId : '1'
})).toEqual({ activeMenu: 'Flow'})
}),
it("should not change the state to Flow when OPTIONS tab is selected and we selected a flow and a flow as selected before", () => {
expect(reducer({activeMenu: 'Options'},
- { type: SELECT_FLOW,
+ { type: SELECT,
currentSelection: '1',
flowId : '2'
})).toEqual({ activeMenu: 'Options'})