debian-mirror-gitlab/spec/frontend/pipelines/pipeline_store_spec.js

28 lines
619 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
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' });
2018-12-13 13:39:08 +05:30
2017-09-10 17:25:29 +05:30
expect(store.state.pipeline).toEqual({ foo: 'bar' });
});
});
});