summaryrefslogtreecommitdiff
path: root/spec/javascripts/ide/stores/actions_spec.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-07-26 14:56:56 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-07-26 14:56:56 +0000
commitcded268ca1d49fe93b8e0940586e9792347c88c3 (patch)
tree9d84a5e8ae38e53514b6ab1f4e99d38ddf2fe138 /spec/javascripts/ide/stores/actions_spec.js
parent8873840839811948b2f29175177b91bcf806a3f8 (diff)
downloadgitlab-ce-cded268ca1d49fe93b8e0940586e9792347c88c3.tar.gz
Enable deleting files in the Web IDE
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,
+ );
+ });
+ });
});