describe('Component vnDropDown', () => { let $element; let controller; beforeEach(ngModule('vnCore')); beforeEach(inject(($compile, $rootScope, $document) => { $element = $compile(``)($rootScope); $document.find('body').append($element); controller = $element.controller('vnDropDown'); })); afterEach(() => { $element.remove(); }); describe('show() method', () => { it(`should enable the show property`, () => { controller.show(); expect(controller.shown).toEqual(true); }); }); describe('hide() method', () => { it(`should disable the show property`, () => { controller.hide(); expect(controller.shown).toEqual(false); }); }); });