Skip to content

Commit

Permalink
very simple animation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
makeusabrew committed Jun 29, 2012
1 parent 25bc930 commit 82887c2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/index.html
Expand Up @@ -33,6 +33,7 @@
<script src="test.confirm.js"></script>
<script src="test.prompt.js"></script>
<script src="test.locales.js"></script>
<script src="test.animate.js"></script>

<script>
$(function() {
Expand Down
34 changes: 34 additions & 0 deletions tests/test.animate.js
@@ -0,0 +1,34 @@
describe("animate", function() {
var box;

before(function() {
bootbox.animate(true);
});

after(function() {
$(".bootbox")
.modal('hide')
.remove();
});

describe("when enabled", function() {
before(function() {
box = bootbox.dialog("foo");
});

it("should apply the correct class to the modal", function() {
assert.isTrue(box.hasClass("fade"));
});
});

describe("when disabled but passed as an option", function() {
before(function() {
bootbox.animate(false);
box = bootbox.dialog("foo", [], {"animate": true});
});

it("should apply the correct class to the modal", function() {
assert.isTrue(box.hasClass("fade"));
});
});
});

0 comments on commit 82887c2

Please sign in to comment.