diff options
Diffstat (limited to 'web/src/js')
3 files changed, 18 insertions, 30 deletions
diff --git a/web/src/js/__tests__/components/Modal/__snapshots__/ModalSpec.js.snap b/web/src/js/__tests__/components/Modal/__snapshots__/ModalSpec.js.snap index 92dad72b..8d9271f1 100644 --- a/web/src/js/__tests__/components/Modal/__snapshots__/ModalSpec.js.snap +++ b/web/src/js/__tests__/components/Modal/__snapshots__/ModalSpec.js.snap @@ -117,7 +117,7 @@ exports[`Modal Component should render correctly 2`] = ` name="choiceOption" onChange={[Function]} onKeyDown={[Function]} - selected="b" + value="b" > <option value="a" @@ -246,34 +246,7 @@ exports[`Modal Component should render correctly 2`] = ` </div> <div className="modal-footer" - > - <button - className="btn btn-default" - onClick={[Function]} - type="button" - > - <i - className="fa fa-download" - /> - Download - </button> - <a - className="btn btn-primary" - href="#" - onClick={[Function]} - title={undefined} - > - <i - className="fa fa-fw fa-upload" - /> - Load - <input - className="hidden" - onChange={[Function]} - type="file" - /> - </a> - </div> + /> </div> </div> </div> diff --git a/web/src/js/__tests__/components/Modal/__snapshots__/OptionSpec.js.snap b/web/src/js/__tests__/components/Modal/__snapshots__/OptionSpec.js.snap index 514e0eb5..257bddce 100644 --- a/web/src/js/__tests__/components/Modal/__snapshots__/OptionSpec.js.snap +++ b/web/src/js/__tests__/components/Modal/__snapshots__/OptionSpec.js.snap @@ -18,7 +18,7 @@ exports[`BooleanOption Component should render correctly 1`] = ` exports[`ChoiceOption Component should render correctly 1`] = ` <select onChange={[Function]} - selected="a" + value="a" > <option value="a" 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" + } + ) + }) +}) |