summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-03-25 20:05:54 +0200
committerTim Zallmann <tzallmann@gitlab.com>2018-03-28 12:17:02 +0200
commitf00a971a6da0407d7df2f4d8d2905a711a437b4d (patch)
tree023b300bd5aaea822f79ef87076e847f1447895d /spec
parentfa3b02413b356d47fa75bab193e4d323e6db416a (diff)
downloadgitlab-ce-f00a971a6da0407d7df2f4d8d2905a711a437b4d.tar.gz
ESLint + Karma fixes
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/ide/components/changed_file_icon_spec.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/javascripts/ide/components/changed_file_icon_spec.js b/spec/javascripts/ide/components/changed_file_icon_spec.js
index 987aea7befc..1e3c8fa95c4 100644
--- a/spec/javascripts/ide/components/changed_file_icon_spec.js
+++ b/spec/javascripts/ide/components/changed_file_icon_spec.js
@@ -11,6 +11,7 @@ describe('IDE changed file icon', () => {
vm = createComponent(component, {
file: {
tempFile: false,
+ changed: true,
},
});
});
@@ -20,10 +21,16 @@ describe('IDE changed file icon', () => {
});
describe('changedIcon', () => {
- it('equals file-modified when not a temp file', () => {
+ it('equals file-modified when not a temp file and has changes', () => {
expect(vm.changedIcon).toBe('file-modified');
});
+ it('equals git-merge when not a temp file and has no changes', () => {
+ vm.file.changed = false;
+
+ expect(vm.changedIcon).toBe('git-merge');
+ });
+
it('equals file-addition when a temp file', () => {
vm.file.tempFile = true;
@@ -36,6 +43,12 @@ describe('IDE changed file icon', () => {
expect(vm.changedIconClass).toContain('multi-file-modified');
});
+ it('includes multi-git-merge when a mr changed file', () => {
+ vm.file.changed = false;
+
+ expect(vm.changedIconClass).toContain('multi-git-merge');
+ });
+
it('includes multi-file-addition when a temp file', () => {
vm.file.tempFile = true;