summaryrefslogtreecommitdiff
path: root/spec/frontend/diffs
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 06:09:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 06:09:25 +0000
commit3d064c737e8448880e6180aeddc59000a01aa6a8 (patch)
treec97dcfe02e48426f96865068ffe8dcdd17bb1a96 /spec/frontend/diffs
parent7ba5b9babaa5802c39e686c57cbf4a3f4725c4b0 (diff)
downloadgitlab-ce-3d064c737e8448880e6180aeddc59000a01aa6a8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r--spec/frontend/diffs/store/mutations_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/mutations_spec.js b/spec/frontend/diffs/store/mutations_spec.js
index f486a53fc4d..ad05f27b325 100644
--- a/spec/frontend/diffs/store/mutations_spec.js
+++ b/spec/frontend/diffs/store/mutations_spec.js
@@ -51,6 +51,24 @@ describe('DiffsStoreMutations', () => {
});
});
+ describe('SET_DIFF_FILES', () => {
+ it('should set diffFiles in state', () => {
+ const state = {};
+
+ mutations[types.SET_DIFF_FILES](state, ['file', 'another file']);
+
+ expect(state.diffFiles.length).toEqual(2);
+ });
+
+ it('should not set anything except diffFiles in state', () => {
+ const state = {};
+
+ mutations[types.SET_DIFF_FILES](state, ['file', 'another file']);
+
+ expect(Object.keys(state)).toEqual(['diffFiles']);
+ });
+ });
+
describe('SET_DIFF_DATA', () => {
it('should set diff data type properly', () => {
const state = {