summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/stores/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/stores/actions_spec.js')
-rw-r--r--spec/frontend/ide/stores/actions_spec.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/spec/frontend/ide/stores/actions_spec.js b/spec/frontend/ide/stores/actions_spec.js
index d47dd88dd47..ad55313da93 100644
--- a/spec/frontend/ide/stores/actions_spec.js
+++ b/spec/frontend/ide/stores/actions_spec.js
@@ -4,6 +4,7 @@ import eventHub from '~/ide/eventhub';
import { createRouter } from '~/ide/ide_router';
import { createStore } from '~/ide/stores';
import {
+ init,
stageAllChanges,
unstageAllChanges,
toggleFileFinder,
@@ -54,15 +55,15 @@ describe('Multi-file store actions', () => {
});
});
- describe('setInitialData', () => {
- it('commits initial data', (done) => {
- store
- .dispatch('setInitialData', { canCommit: true })
- .then(() => {
- expect(store.state.canCommit).toBeTruthy();
- done();
- })
- .catch(done.fail);
+ describe('init', () => {
+ it('commits initial data and requests user callouts', () => {
+ return testAction(
+ init,
+ { canCommit: true },
+ store.state,
+ [{ type: 'SET_INITIAL_DATA', payload: { canCommit: true } }],
+ [],
+ );
});
});