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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 21:27:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 21:27:09 +0300
commitbcc70301531b6c3118120173389f2aaa7452bf11 (patch)
tree161f1ee56e15ec9e59f48c5e1a9cb86b62469a49 /spec/frontend/diffs
parentd47fc5085a706ab37d038636c9d5934da69853f0 (diff)
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r--spec/frontend/diffs/store/actions_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js
index ec6ad031813..fc5e39357ca 100644
--- a/spec/frontend/diffs/store/actions_spec.js
+++ b/spec/frontend/diffs/store/actions_spec.js
@@ -1603,6 +1603,18 @@ describe('DiffsStoreActions', () => {
expect(commit).toHaveBeenCalledWith(types.UPDATE_CURRENT_DIFF_FILE_ID, '123');
});
+
+ it('does not commit UPDATE_CURRENT_DIFF_FILE_ID when discussion has no diff_file', () => {
+ const commit = jest.fn();
+ const rootGetters = {
+ getDiscussion: () => ({ id: '1' }),
+ notesById: { '1': { discussion_id: '2' } },
+ };
+
+ setCurrentDiffFileIdFromNote({ commit, rootGetters }, '1');
+
+ expect(commit).not.toHaveBeenCalled();
+ });
});
describe('navigateToDiffFileIndex', () => {