diff options
author | Kushal Pandya <kushal@gitlab.com> | 2018-04-09 14:44:12 +0300 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2018-04-23 12:22:08 +0300 |
commit | 2f57341bf6af2543c1d92b34edd15f7c4bc47bef (patch) | |
tree | a33514b66a05d0c887a91727796a97e932d8f18c /spec/javascripts/vue_shared/components/sidebar/labels_select | |
parent | a011667788fc64602d0755abb6c457bb278d066b (diff) |
Emit `toggleCollapse`, `onDropdownClose` on component
Diffstat (limited to 'spec/javascripts/vue_shared/components/sidebar/labels_select')
-rw-r--r-- | spec/javascripts/vue_shared/components/sidebar/labels_select/base_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/sidebar/labels_select/base_spec.js b/spec/javascripts/vue_shared/components/sidebar/labels_select/base_spec.js index 6fe95153204..e8685ab48be 100644 --- a/spec/javascripts/vue_shared/components/sidebar/labels_select/base_spec.js +++ b/spec/javascripts/vue_shared/components/sidebar/labels_select/base_spec.js @@ -73,6 +73,22 @@ describe('BaseComponent', () => { expect(vm.$emit).toHaveBeenCalledWith('onLabelClick', mockLabels[0]); }); }); + + describe('handleCollapsedValueClick', () => { + it('emits toggleCollapse event on component', () => { + spyOn(vm, '$emit'); + vm.handleCollapsedValueClick(); + expect(vm.$emit).toHaveBeenCalledWith('toggleCollapse'); + }); + }); + + describe('handleDropdownHidden', () => { + it('emits onDropdownClose event on component', () => { + spyOn(vm, '$emit'); + vm.handleDropdownHidden(); + expect(vm.$emit).toHaveBeenCalledWith('onDropdownClose'); + }); + }); }); describe('mounted', () => { |