diff options
Diffstat (limited to 'spec/javascripts/notes/stores/mutation_spec.js')
-rw-r--r-- | spec/javascripts/notes/stores/mutation_spec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/notes/stores/mutation_spec.js b/spec/javascripts/notes/stores/mutation_spec.js index 1c4449d1055..bca87a53b1a 100644 --- a/spec/javascripts/notes/stores/mutation_spec.js +++ b/spec/javascripts/notes/stores/mutation_spec.js @@ -297,6 +297,16 @@ describe('Notes Store mutations', () => { expect(state.discussions[0].expanded).toEqual(false); }); + + it('forces a discussions expanded state', () => { + const state = { + discussions: [{ ...discussionMock, expanded: false }], + }; + + mutations.TOGGLE_DISCUSSION(state, { discussionId: discussionMock.id, shouldExpand: true }); + + expect(state.discussions[0].expanded).toEqual(true); + }); }); describe('UPDATE_NOTE', () => { |