summaryrefslogtreecommitdiff
path: root/spec/javascripts/ide/stores/actions/file_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/ide/stores/actions/file_spec.js')
-rw-r--r--spec/javascripts/ide/stores/actions/file_spec.js38
1 files changed, 22 insertions, 16 deletions
diff --git a/spec/javascripts/ide/stores/actions/file_spec.js b/spec/javascripts/ide/stores/actions/file_spec.js
index ce5c525bed7..3ef5a859001 100644
--- a/spec/javascripts/ide/stores/actions/file_spec.js
+++ b/spec/javascripts/ide/stores/actions/file_spec.js
@@ -398,6 +398,20 @@ describe('IDE store file actions', () => {
})
.catch(done.fail);
});
+
+ it('bursts unused seal', done => {
+ store
+ .dispatch('changeFileContent', {
+ path: tmpFile.path,
+ content: 'content',
+ })
+ .then(() => {
+ expect(store.state.unusedSeal).toBe(false);
+
+ done();
+ })
+ .catch(done.fail);
+ });
});
describe('discardFileChanges', () => {
@@ -497,7 +511,10 @@ describe('IDE store file actions', () => {
actions.stageChange,
'path',
store.state,
- [{ type: types.STAGE_CHANGE, payload: 'path' }],
+ [
+ { type: types.STAGE_CHANGE, payload: 'path' },
+ { type: types.SET_LAST_COMMIT_MSG, payload: '' },
+ ],
[],
done,
);
@@ -510,7 +527,10 @@ describe('IDE store file actions', () => {
actions.unstageChange,
'path',
store.state,
- [{ type: types.UNSTAGE_CHANGE, payload: 'path' }],
+ [
+ { type: types.UNSTAGE_CHANGE, payload: 'path' },
+ { type: types.SET_LAST_COMMIT_MSG, payload: '' },
+ ],
[],
done,
);
@@ -575,20 +595,6 @@ describe('IDE store file actions', () => {
.then(done)
.catch(done.fail);
});
-
- it('returns false when passed in file is active & viewer is diff', done => {
- f.active = true;
- store.state.openFiles.push(f);
- store.state.viewer = 'diff';
-
- store
- .dispatch('openPendingTab', { file: f, keyPrefix: 'pending' })
- .then(added => {
- expect(added).toBe(false);
- })
- .then(done)
- .catch(done.fail);
- });
});
describe('removePendingTab', () => {