debian-mirror-gitlab/spec/javascripts/jobs/components/job_store_spec.js

27 lines
574 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
import JobStore from '~/jobs/stores/job_store';
2018-11-20 20:47:30 +05:30
import job from '../mock_data';
2017-09-10 17:25:29 +05:30
describe('Job Store', () => {
let store;
beforeEach(() => {
store = new JobStore();
});
it('should set defaults', () => {
expect(store.state.job).toEqual({});
});
describe('storeJob', () => {
it('should store empty object if none is provided', () => {
store.storeJob();
expect(store.state.job).toEqual({});
});
it('should store provided argument', () => {
store.storeJob(job);
expect(store.state.job).toEqual(job);
});
});
});