diff --git a/src/accordion/test/accordion.spec.js b/src/accordion/test/accordion.spec.js index decedaf98b..26aeffc94f 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,16 @@ describe('accordion', function () { scope.$digest(); expect(findGroupBody(0).scope().isOpen).toBe(false); }); + + it('should add "open" when opened', function() { + findGroupLink(0).click(); + scope.$digest(); + expect(findGroupBody(0)).toHaveClass('open'); + + findGroupLink(0).click(); + scope.$digest(); + expect(findGroupBody(0)).not.toHaveClass('open'); + }); }); describe('with dynamic panels', function () { diff --git a/template/accordion/accordion-group.html b/template/accordion/accordion-group.html index 8ad810abe8..436f88bf72 100644 --- a/template/accordion/accordion-group.html +++ b/template/accordion/accordion-group.html @@ -4,7 +4,7 @@

{{heading}}

-
+