]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Adjusted test case for up(). 9212/head
authorMarius Olbertz <marius.olbertz@gmail.com>
Thu, 29 Sep 2016 19:58:50 +0000 (21:58 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Thu, 29 Sep 2016 19:58:50 +0000 (21:58 +0200)
test/javascript/components/accordion.js

index 83c44c9d32c843c1fa1476588c38e5f7bb66bf5a..c4837c5e383afec1ce2d1641d5068a6d8318d891 100644 (file)
@@ -55,11 +55,11 @@ describe('Accordion', function() {
 
     it('toggles attributes of title of the targeted container', function() {
       $html = $(template).appendTo('body');
-      plugin = new Foundation.Accordion($html, {});
+      plugin = new Foundation.Accordion($html, {allowAllClosed: true});
 
-      plugin.up($html.find('.accordion-content').eq(1));
-      $html.find('.accordion-title').eq(1).should.have.attr('aria-expanded', 'false');
-      $html.find('.accordion-title').eq(1).should.have.attr('aria-selected', 'false');
+      plugin.up($html.find('.accordion-content').eq(0));
+      $html.find('.accordion-title').eq(0).should.have.attr('aria-expanded', 'false');
+      $html.find('.accordion-title').eq(0).should.have.attr('aria-selected', 'false');
     });
 
     it('not closes the open container if allowAllClosed is false', function() {