diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-23 21:27:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-23 21:27:09 +0300 |
commit | bcc70301531b6c3118120173389f2aaa7452bf11 (patch) | |
tree | 161f1ee56e15ec9e59f48c5e1a9cb86b62469a49 /spec/frontend/diffs | |
parent | d47fc5085a706ab37d038636c9d5934da69853f0 (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.js | 12 |
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', () => { |