summaryrefslogtreecommitdiff
path: root/spec/frontend/notes/stores/mutation_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/notes/stores/mutation_spec.js')
-rw-r--r--spec/frontend/notes/stores/mutation_spec.js10
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: {