diff options
Diffstat (limited to 'spec/frontend/diffs/store')
-rw-r--r-- | spec/frontend/diffs/store/actions_spec.js | 7 | ||||
-rw-r--r-- | spec/frontend/diffs/store/mutations_spec.js | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index 6d005b868a9..b35abc9da02 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -186,15 +186,16 @@ describe('DiffsStoreActions', () => { {}, { endpointBatch, diffViewType: 'inline' }, [ - { type: types.SET_BATCH_LOADING, payload: true }, + { type: types.SET_BATCH_LOADING_STATE, payload: 'loading' }, { type: types.SET_RETRIEVING_BATCHES, payload: true }, { type: types.SET_DIFF_DATA_BATCH, payload: { diff_files: res1.diff_files } }, - { type: types.SET_BATCH_LOADING, payload: false }, + { type: types.SET_BATCH_LOADING_STATE, payload: 'loaded' }, { type: types.VIEW_DIFF_FILE, payload: 'test' }, { type: types.SET_DIFF_DATA_BATCH, payload: { diff_files: res2.diff_files } }, - { type: types.SET_BATCH_LOADING, payload: false }, + { type: types.SET_BATCH_LOADING_STATE, payload: 'loaded' }, { type: types.VIEW_DIFF_FILE, payload: 'test2' }, { type: types.SET_RETRIEVING_BATCHES, payload: false }, + { type: types.SET_BATCH_LOADING_STATE, payload: 'error' }, ], [{ type: 'startRenderDiffsQueue' }, { type: 'startRenderDiffsQueue' }], done, diff --git a/spec/frontend/diffs/store/mutations_spec.js b/spec/frontend/diffs/store/mutations_spec.js index b549ca42634..fc9ba223d5a 100644 --- a/spec/frontend/diffs/store/mutations_spec.js +++ b/spec/frontend/diffs/store/mutations_spec.js @@ -31,13 +31,13 @@ describe('DiffsStoreMutations', () => { }); }); - describe('SET_BATCH_LOADING', () => { + describe('SET_BATCH_LOADING_STATE', () => { it('should set loading state', () => { const state = {}; - mutations[types.SET_BATCH_LOADING](state, false); + mutations[types.SET_BATCH_LOADING_STATE](state, false); - expect(state.isBatchLoading).toEqual(false); + expect(state.batchLoadingState).toEqual(false); }); }); |