diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-10-16 16:19:56 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-10-16 16:19:56 +0300 |
commit | 836439885afc952bc4cd4f638b9009f44aba31ad (patch) | |
tree | c31e837b547f7a0307622ecc11e1cb85dc9d73c9 /spec | |
parent | 6b74baeaf8a243b20bb31a94df92c0d0219aed9b (diff) | |
parent | ff55aa7ebb8a54e5dceee845904a8c75b46b3f1b (diff) |
Merge branch 'ide-file-templates-clear' into 'master'
Fixed file templates not clearing in Web IDE
Closes #52487
See merge request gitlab-org/gitlab-ce!22357
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/ide/stores/modules/file_templates/mutations_spec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/javascripts/ide/stores/modules/file_templates/mutations_spec.js b/spec/javascripts/ide/stores/modules/file_templates/mutations_spec.js index a51527d699f..8e0e3ae99a1 100644 --- a/spec/javascripts/ide/stores/modules/file_templates/mutations_spec.js +++ b/spec/javascripts/ide/stores/modules/file_templates/mutations_spec.js @@ -49,6 +49,14 @@ describe('IDE file templates mutations', () => { expect(state.selectedTemplateType).toBe('type'); }); + + it('clears templates', () => { + state.templates = ['test']; + + mutations[types.SET_SELECTED_TEMPLATE_TYPE](state, 'type'); + + expect(state.templates).toEqual([]); + }); }); describe(types.SET_UPDATE_SUCCESS, () => { |