diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/frontend/notes/stores/mutation_spec.js | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/frontend/notes/stores/mutation_spec.js')
-rw-r--r-- | spec/frontend/notes/stores/mutation_spec.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/frontend/notes/stores/mutation_spec.js b/spec/frontend/notes/stores/mutation_spec.js index 99e24f724f4..c9e24039b64 100644 --- a/spec/frontend/notes/stores/mutation_spec.js +++ b/spec/frontend/notes/stores/mutation_spec.js @@ -159,7 +159,7 @@ describe('Notes Store mutations', () => { }); }); - describe('SET_INITIAL_DISCUSSIONS', () => { + describe('ADD_OR_UPDATE_DISCUSSIONS', () => { it('should set the initial notes received', () => { const state = { discussions: [], @@ -169,15 +169,17 @@ describe('Notes Store mutations', () => { individual_note: true, notes: [ { + id: 100, note: '1', }, { + id: 101, note: '2', }, ], }; - mutations.SET_INITIAL_DISCUSSIONS(state, [note, legacyNote]); + mutations.ADD_OR_UPDATE_DISCUSSIONS(state, [note, legacyNote]); expect(state.discussions[0].id).toEqual(note.id); expect(state.discussions[1].notes[0].note).toBe(legacyNote.notes[0].note); @@ -190,7 +192,7 @@ describe('Notes Store mutations', () => { discussions: [], }; - mutations.SET_INITIAL_DISCUSSIONS(state, [ + mutations.ADD_OR_UPDATE_DISCUSSIONS(state, [ { ...note, diff_file: { @@ -208,7 +210,7 @@ describe('Notes Store mutations', () => { discussions: [], }; - mutations.SET_INITIAL_DISCUSSIONS(state, [ + mutations.ADD_OR_UPDATE_DISCUSSIONS(state, [ { ...note, diff_file: { |