summaryrefslogtreecommitdiff
path: root/spec/javascripts/ide/stores/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/ide/stores/actions_spec.js')
-rw-r--r--spec/javascripts/ide/stores/actions_spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/javascripts/ide/stores/actions_spec.js b/spec/javascripts/ide/stores/actions_spec.js
index 8b665a6d79e..792a716565c 100644
--- a/spec/javascripts/ide/stores/actions_spec.js
+++ b/spec/javascripts/ide/stores/actions_spec.js
@@ -7,6 +7,7 @@ import actions, {
updateActivityBarView,
updateTempFlagForEntry,
setErrorMessage,
+ deleteEntry,
} from '~/ide/stores/actions';
import store from '~/ide/stores';
import * as types from '~/ide/stores/mutation_types';
@@ -457,4 +458,19 @@ describe('Multi-file store actions', () => {
);
});
});
+
+ describe('deleteEntry', () => {
+ it('commits entry deletion', done => {
+ store.state.entries.path = 'testing';
+
+ testAction(
+ deleteEntry,
+ 'path',
+ store.state,
+ [{ type: types.DELETE_ENTRY, payload: 'path' }],
+ [{ type: 'burstUnusedSeal' }, { type: 'closeFile', payload: store.state.entries.path }],
+ done,
+ );
+ });
+ });
});