Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mutations_spec.js « store « header_search « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8196c06099d8edadd941c2d1069df2fbe848c9aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import * as types from '~/header_search/store/mutation_types';
import mutations from '~/header_search/store/mutations';
import createState from '~/header_search/store/state';
import { MOCK_SEARCH } from '../mock_data';

describe('Header Search Store Mutations', () => {
  let state;

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

  describe('SET_SEARCH', () => {
    it('sets search to value', () => {
      mutations[types.SET_SEARCH](state, MOCK_SEARCH);

      expect(state.search).toBe(MOCK_SEARCH);
    });
  });
});