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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ref/stores/mutations_spec.js')
-rw-r--r--spec/frontend/ref/stores/mutations_spec.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/frontend/ref/stores/mutations_spec.js b/spec/frontend/ref/stores/mutations_spec.js
index cda13089766..11d4fe0e206 100644
--- a/spec/frontend/ref/stores/mutations_spec.js
+++ b/spec/frontend/ref/stores/mutations_spec.js
@@ -1,4 +1,4 @@
-import { X_TOTAL_HEADER } from '~/ref/constants';
+import { X_TOTAL_HEADER, ALL_REF_TYPES } from '~/ref/constants';
import * as types from '~/ref/stores/mutation_types';
import mutations from '~/ref/stores/mutations';
import createState from '~/ref/stores/state';
@@ -13,6 +13,7 @@ describe('Ref selector Vuex store mutations', () => {
describe('initial state', () => {
it('is created with the correct structure and initial values', () => {
expect(state).toEqual({
+ enabledRefTypes: [],
projectId: null,
query: '',
@@ -39,6 +40,14 @@ describe('Ref selector Vuex store mutations', () => {
});
});
+ describe(`${types.SET_ENABLED_REF_TYPES}`, () => {
+ it('sets the enabled ref types', () => {
+ mutations[types.SET_ENABLED_REF_TYPES](state, ALL_REF_TYPES);
+
+ expect(state.enabledRefTypes).toBe(ALL_REF_TYPES);
+ });
+ });
+
describe(`${types.SET_PROJECT_ID}`, () => {
it('updates the project ID', () => {
const newProjectId = '4';