Skip to content

Commit f7c6824

Browse files
committed
Accordion unit tests: Cleaned and fixed destroy-method test, working around html rendering inconsistencies
1 parent ad6b462 commit f7c6824

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/unit/accordion/accordion.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2 id="qunit-userAgent"></h2>
5555
<div>
5656
<div id="list1" class="foo">
5757
<a class="bar">There is one obvious advantage:</a>
58-
<div style="font-style: normal; " class="foo">
58+
<div class="foo">
5959
<p>
6060
You've seen it coming!
6161
<br/>
@@ -65,7 +65,7 @@ <h2 id="qunit-userAgent"></h2>
6565
</p>
6666
</div>
6767
<a class="bar">Now that you've got...</a>
68-
<div style="font-style: normal; " class="foo">
68+
<div class="foo">
6969
<p>
7070
your bear, you have to admit it!
7171
<br/>
@@ -76,7 +76,7 @@ <h2 id="qunit-userAgent"></h2>
7676
</p>
7777
</div>
7878
<a class="bar">Rent one bear, ...</a>
79-
<div style="font-style: normal; " class="foo">
79+
<div class="foo">
8080
<p>
8181
get two for three beer.
8282
</p>

tests/unit/accordion/accordion_methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test("init", function() {
3131
});
3232

3333
test("destroy", function() {
34-
var beforeHtml = $("#list1").parent().html();
34+
var beforeHtml = $("#list1").find("div").css("font-style", "normal").end().parent().html();
3535
var afterHtml = $("#list1").accordion().accordion("destroy").parent().html();
3636
equal( afterHtml, beforeHtml );
3737
});

0 commit comments

Comments
 (0)