Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2011-09-10 09:47:49 +0400
committerJacob Thornton <jacobthornton@gmail.com>2011-09-10 09:47:49 +0400
commit5f4e30ed1d33f83b0fad3afc9174e193e6c3fdf4 (patch)
tree105cd02ae9923fb2171f695e261e5311c81786b3 /js/tests/unit/bootstrap-modal.js
parentdf3ca4d94a69436c1d6c53f5559aefca98fb2232 (diff)
move js plugins to root dir, begin writing tests, and change modal plugin to be more boss like
Diffstat (limited to 'js/tests/unit/bootstrap-modal.js')
-rw-r--r--js/tests/unit/bootstrap-modal.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-modal.js b/js/tests/unit/bootstrap-modal.js
new file mode 100644
index 0000000000..24510664ce
--- /dev/null
+++ b/js/tests/unit/bootstrap-modal.js
@@ -0,0 +1,32 @@
+$(function () {
+
+ module("bootstrap-modal")
+
+ test("should be defined on jquery object", function () {
+ ok($(document.body).modal, 'modal method is defined')
+ })
+
+ test("should not return element", function () {
+ ok(!$(document.body).modal()[0], 'document.body not returned')
+ })
+
+ test("should return instance of modal class", function () {
+ ok($(document.body).modal() instanceof $.fn.modal.Modal, 'document.body returned')
+ })
+
+ test("should expose defaults var for settings", {
+ ok(!!$.fn.modal.default, 'default object exposed')
+ })
+
+ test("should insert into dom when open is called", function () {
+ var div = $("<div></div>")
+ div.modal().open()
+ })
+
+ test("should remove from dom when close is called", function () {
+ $.support.transition = false
+ re
+ })
+
+ test("should remove from dom when click .close")
+}) \ No newline at end of file