diff options
Diffstat (limited to 'spec/javascripts/groups/components/item_actions_spec.js')
-rw-r--r-- | spec/javascripts/groups/components/item_actions_spec.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/javascripts/groups/components/item_actions_spec.js b/spec/javascripts/groups/components/item_actions_spec.js index 15fd37ebcd2..bffeb4acd45 100644 --- a/spec/javascripts/groups/components/item_actions_spec.js +++ b/spec/javascripts/groups/components/item_actions_spec.js @@ -30,6 +30,7 @@ describe('ItemActionsComponent', () => { it('emits `showLeaveGroupModal` event with `group` and `parentGroup` props', () => { spyOn(eventHub, '$emit'); vm.onLeaveGroup(); + expect(eventHub.$emit).toHaveBeenCalledWith('showLeaveGroupModal', vm.group, vm.parentGroup); }); }); @@ -46,6 +47,7 @@ describe('ItemActionsComponent', () => { const newVm = createComponent(group); const editBtn = newVm.$el.querySelector('a.edit-group'); + expect(editBtn).toBeDefined(); expect(editBtn.classList.contains('no-expand')).toBeTruthy(); expect(editBtn.getAttribute('href')).toBe(group.editPath); @@ -63,6 +65,7 @@ describe('ItemActionsComponent', () => { const newVm = createComponent(group); const leaveBtn = newVm.$el.querySelector('a.leave-group'); + expect(leaveBtn).toBeDefined(); expect(leaveBtn.classList.contains('no-expand')).toBeTruthy(); expect(leaveBtn.getAttribute('href')).toBe(group.leavePath); |