diff options
Diffstat (limited to 'spec/frontend/notes/stores/mutation_spec.js')
-rw-r--r-- | spec/frontend/notes/stores/mutation_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/notes/stores/mutation_spec.js b/spec/frontend/notes/stores/mutation_spec.js index c9e24039b64..da1547ab6e7 100644 --- a/spec/frontend/notes/stores/mutation_spec.js +++ b/spec/frontend/notes/stores/mutation_spec.js @@ -159,6 +159,18 @@ describe('Notes Store mutations', () => { }); }); + describe('CLEAR_DISCUSSIONS', () => { + it('should set discussions to an empty array', () => { + const state = { + discussions: [discussionMock], + }; + + mutations.CLEAR_DISCUSSIONS(state); + + expect(state.discussions).toEqual([]); + }); + }); + describe('ADD_OR_UPDATE_DISCUSSIONS', () => { it('should set the initial notes received', () => { const state = { |