diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-06-12 12:57:37 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2017-06-12 12:57:37 +0200 |
commit | c1ba6b6c218edcbcf53a8f15be62474a9b34c0a4 (patch) | |
tree | 6c3c05975e7d602c13d299a62151731aef6810b9 /web/src/js/__tests__/ducks/ui | |
parent | 49a04e37c36d576bb764c3cb2dac239b24d261be (diff) | |
download | mitmproxy-c1ba6b6c218edcbcf53a8f15be62474a9b34c0a4.tar.gz mitmproxy-c1ba6b6c218edcbcf53a8f15be62474a9b34c0a4.tar.bz2 mitmproxy-c1ba6b6c218edcbcf53a8f15be62474a9b34c0a4.zip |
[web] fix stopEdit
Diffstat (limited to 'web/src/js/__tests__/ducks/ui')
-rw-r--r-- | web/src/js/__tests__/ducks/ui/flowSpec.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web/src/js/__tests__/ducks/ui/flowSpec.js b/web/src/js/__tests__/ducks/ui/flowSpec.js index cd6ffa2f..11ca021e 100644 --- a/web/src/js/__tests__/ducks/ui/flowSpec.js +++ b/web/src/js/__tests__/ducks/ui/flowSpec.js @@ -11,7 +11,7 @@ import reducer, { displayLarge } from '../../../ducks/ui/flow' -import { select, updateFlow } from '../../../ducks/flows' +import * as flowActions from '../../../ducks/flows' describe('flow reducer', () => { it('should return initial state', () => { @@ -61,11 +61,11 @@ describe('flow reducer', () => { }) it('should not change the contentview mode', () => { - expect(reducer({contentView: 'foo'}, select(1)).contentView).toEqual('foo') + expect(reducer({contentView: 'foo'}, flowActions.select(1)).contentView).toEqual('foo') }) it('should change the contentview mode to auto after editing when a new flow will be selected', () => { - expect(reducer({contentView: 'foo', modifiedFlow : 'test_flow'}, select(1)).contentView).toEqual('Auto') + expect(reducer({contentView: 'foo', modifiedFlow : 'test_flow'}, flowActions.select(1)).contentView).toEqual('Auto') }) it('should set update and merge the modifiedflow with the update values', () => { @@ -84,7 +84,11 @@ describe('flow reducer', () => { it('should stop editing when the selected flow is updated', () => { let modifiedFlow = {id: 1} let updatedFlow = {id: 1} - expect(reducer({modifiedFlow}, stopEdit(updatedFlow, modifiedFlow)).modifiedFlow).toBeFalsy() + expect(reducer( + { modifiedFlow }, + {type: flowActions.UPDATE, data: modifiedFlow} + ).modifiedFlow + ).toBeFalsy() }) it('should set content view', () => { |