Skip to content

Commit

Permalink
test(tooltip): remove tooltip after parent destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
gucheen committed Oct 12, 2016
1 parent 1649d76 commit 2481964
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/tooltip/tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ describe('MdTooltip', () => {
tooltipDirective._handleMouseLeave(null);
expect(overlayContainerElement.textContent).toBe('');
});

it('should be removed after parent destroyed', () => {
tooltipDirective._handleMouseEnter(null);
expect(tooltipDirective.visible).toBeTruthy();
fixture.destroy();
expect(overlayContainerElement.childNodes.length).toBe(0);
expect(overlayContainerElement.textContent).toBe('');
});
});
});

Expand Down

0 comments on commit 2481964

Please sign in to comment.