diff --git a/src/accordion/test/accordion.spec.js b/src/accordion/test/accordion.spec.js index decedaf98b..7f8976586f 100644 --- a/src/accordion/test/accordion.spec.js +++ b/src/accordion/test/accordion.spec.js @@ -114,7 +114,7 @@ describe('accordion', function () { it('should expose the controller on the view', function () { $templateCache.put('template/accordion/accordion.html', '
{{accordion.text}}
'); - element = $compile('')(scope); scope.$digest(); var ctrl = element.controller('accordion'); @@ -211,6 +211,17 @@ describe('accordion', function () { scope.$digest(); expect(findGroupBody(0).scope().isOpen).toBe(false); }); + + it('should add "open" when opened', function() { + var group = groups.eq(0); + findGroupLink(0).click(); + scope.$digest(); + expect(group).toHaveClass('panel-open'); + + findGroupLink(0).click(); + scope.$digest(); + expect(group).not.toHaveClass('panel-open'); + }); }); describe('with dynamic panels', function () { diff --git a/template/accordion/accordion-group.html b/template/accordion/accordion-group.html index 8ad810abe8..0b6274e233 100644 --- a/template/accordion/accordion-group.html +++ b/template/accordion/accordion-group.html @@ -1,4 +1,4 @@ -
+