forked from bootboxjs/bootbox
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25bc930
commit 82887c2
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")); | ||
}); | ||
}); | ||
}); |