diff options
Diffstat (limited to 'web/src/js/__tests__/ducks')
-rw-r--r-- | web/src/js/__tests__/ducks/optionsSpec.js | 15 |
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..9178c14e 100644 --- a/web/src/js/__tests__/ducks/optionsSpec.js +++ b/web/src/js/__tests__/ducks/optionsSpec.js @@ -49,3 +49,18 @@ describe('sendUpdate', () => { ]) }) }) + +describe('save', () => { + + it('should dump options', () => { + global.fetch = jest.fn() + store.dispatch(OptionsActions.save()) + expect(fetch).toBeCalledWith( + '/options/save?_xsrf=undefined', + { + credentials: "same-origin", + method: "POST" + } + ) + }) +}) |