summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-22 17:55:19 +0100
committerPhil Hughes <me@iamphill.com>2018-05-22 17:55:19 +0100
commit23a7c3896e84aee13d1a63f62ddc1518f991d509 (patch)
treefbbf648b422e9c65de31d6957891a671f42d9b0d
parent16995b8c0d7e54dc997076d52eb318c0488d88fc (diff)
downloadgitlab-ce-ide-commit-state-bug.tar.gz
-rw-r--r--spec/javascripts/ide/components/repo_editor_spec.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascripts/ide/components/repo_editor_spec.js b/spec/javascripts/ide/components/repo_editor_spec.js
index ff500acd849..41b9363d10f 100644
--- a/spec/javascripts/ide/components/repo_editor_spec.js
+++ b/spec/javascripts/ide/components/repo_editor_spec.js
@@ -346,4 +346,23 @@ describe('RepoEditor', () => {
});
});
});
+
+ it('calls removePendingTab when old file is pending', done => {
+ spyOn(vm, 'removePendingTab');
+
+ vm.file.pending = true;
+
+ vm
+ .$nextTick()
+ .then(() => {
+ vm.file = file('testing');
+
+ return vm.$nextTick();
+ })
+ .then(() => {
+ expect(vm.removePendingTab).toHaveBeenCalled();
+ })
+ .then(done)
+ .catch(done.fail);
+ });
});