diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-02 21:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-02 21:09:44 +0000 |
commit | f96f2720d1b21b76eadedc54fdea67cb70e98d94 (patch) | |
tree | 527d27d5ceb816969e315b6223b3ddb2ca128dae /spec/frontend/diffs/store/mutations_spec.js | |
parent | ad05e1db038a2e983d25555144fa29063e060c50 (diff) | |
download | gitlab-ce-f96f2720d1b21b76eadedc54fdea67cb70e98d94.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs/store/mutations_spec.js')
-rw-r--r-- | spec/frontend/diffs/store/mutations_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/mutations_spec.js b/spec/frontend/diffs/store/mutations_spec.js index 2dda9a0ad71..c061c5c2590 100644 --- a/spec/frontend/diffs/store/mutations_spec.js +++ b/spec/frontend/diffs/store/mutations_spec.js @@ -892,4 +892,18 @@ describe('DiffsStoreMutations', () => { expect(state.showSuggestPopover).toBe(false); }); }); + + describe('SET_FILE_BY_FILE', () => { + it.each` + value | opposite + ${true} | ${false} + ${false} | ${true} + `('sets viewDiffsFileByFile to $value', ({ value, opposite }) => { + const state = { viewDiffsFileByFile: opposite }; + + mutations[types.SET_FILE_BY_FILE](state, value); + + expect(state.viewDiffsFileByFile).toBe(value); + }); + }); }); |