summaryrefslogtreecommitdiff
path: root/spec/frontend/diffs/store/mutations_spec.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-02 21:09:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-02 21:09:44 +0000
commitf96f2720d1b21b76eadedc54fdea67cb70e98d94 (patch)
tree527d27d5ceb816969e315b6223b3ddb2ca128dae /spec/frontend/diffs/store/mutations_spec.js
parentad05e1db038a2e983d25555144fa29063e060c50 (diff)
downloadgitlab-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.js14
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);
+ });
+ });
});