gitlab-org--gitlab-foss/spec/javascripts/pipelines/pipeline_store_spec.js
Filipa Lacerda bb9e7a3f2c CE port of changes made to the pipeline bundle in EE - Fixes typos and adds i18n
Backport common class name for the tab content

Backport more changes
2018-02-20 10:03:15 +00:00

26 lines
618 B
JavaScript

import PipelineStore from '~/pipelines/stores/pipeline_store';
describe('Pipeline Store', () => {
let store;
beforeEach(() => {
store = new PipelineStore();
});
it('should set defaults', () => {
expect(store.state.pipeline).toEqual({});
});
describe('storePipeline', () => {
it('should store empty object if none is provided', () => {
store.storePipeline();
expect(store.state.pipeline).toEqual({});
});
it('should store received object', () => {
store.storePipeline({ foo: 'bar' });
expect(store.state.pipeline).toEqual({ foo: 'bar' });
});
});
});