diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 06:09:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 06:09:25 +0000 |
commit | 3d064c737e8448880e6180aeddc59000a01aa6a8 (patch) | |
tree | c97dcfe02e48426f96865068ffe8dcdd17bb1a96 /spec/frontend/diffs | |
parent | 7ba5b9babaa5802c39e686c57cbf4a3f4725c4b0 (diff) | |
download | gitlab-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.js | 18 |
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 = { |