Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/diffs/store/actions_spec.js')
-rw-r--r--spec/frontend/diffs/store/actions_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js
index 0032fe926d0..c1a7844d301 100644
--- a/spec/frontend/diffs/store/actions_spec.js
+++ b/spec/frontend/diffs/store/actions_spec.js
@@ -48,6 +48,7 @@ import {
moveToNeighboringCommit,
setCurrentDiffFileIdFromNote,
navigateToDiffFileIndex,
+ setFileByFile,
} from '~/diffs/store/actions';
import eventHub from '~/notes/event_hub';
import * as types from '~/diffs/store/mutation_types';
@@ -1455,4 +1456,20 @@ describe('DiffsStoreActions', () => {
);
});
});
+
+ describe('setFileByFile', () => {
+ it.each`
+ value
+ ${true}
+ ${false}
+ `('commits SET_FILE_BY_FILE with the new value $value', ({ value }) => {
+ return testAction(
+ setFileByFile,
+ { fileByFile: value },
+ { viewDiffsFileByFile: null },
+ [{ type: types.SET_FILE_BY_FILE, payload: value }],
+ [],
+ );
+ });
+ });
});