aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/__tests__/ducks/optionsSpec.js
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-07-26 15:16:23 +0800
committerMatthew Shao <me@matshao.com>2017-07-26 15:16:23 +0800
commit4282dc1ac4053d774b0fe6993ae15222fcfe3b3d (patch)
tree9a3d3f5d61e14059c145f661f1f1f42e87c83c3e /web/src/js/__tests__/ducks/optionsSpec.js
parentc3cb77adce5c2cdeaaa62cc002281404c5faa729 (diff)
downloadmitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.tar.gz
mitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.tar.bz2
mitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.zip
[web] Update tests.
Diffstat (limited to 'web/src/js/__tests__/ducks/optionsSpec.js')
-rw-r--r--web/src/js/__tests__/ducks/optionsSpec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/web/src/js/__tests__/ducks/optionsSpec.js b/web/src/js/__tests__/ducks/optionsSpec.js
index 0925fcc1..a0d11f9c 100644
--- a/web/src/js/__tests__/ducks/optionsSpec.js
+++ b/web/src/js/__tests__/ducks/optionsSpec.js
@@ -49,3 +49,18 @@ describe('sendUpdate', () => {
])
})
})
+
+describe('dump', () => {
+
+ it('should dump options', () => {
+ global.fetch = jest.fn()
+ store.dispatch(OptionsActions.dump())
+ expect(fetch).toBeCalledWith(
+ '/options/dump?_xsrf=undefined',
+ {
+ credentials: "same-origin",
+ method: "POST"
+ }
+ )
+ })
+})