summaryrefslogtreecommitdiff
path: root/spec/frontend/whats_new/store/mutations_spec.js
blob: 3c33364fed372a5089136791e7d0725029272e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import mutations from '~/whats_new/store/mutations';
import createState from '~/whats_new/store/state';
import * as types from '~/whats_new/store/mutation_types';

describe('whats new mutations', () => {
  let state;

  beforeEach(() => {
    state = createState;
  });

  describe('openDrawer', () => {
    it('sets open to true', () => {
      mutations[types.OPEN_DRAWER](state);
      expect(state.open).toBe(true);
    });
  });

  describe('closeDrawer', () => {
    it('sets open to false', () => {
      mutations[types.CLOSE_DRAWER](state);
      expect(state.open).toBe(false);
    });
  });
});