2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

move js plugins to root dir, begin writing tests, and change modal plugin to be more boss like

This commit is contained in:
Jacob Thornton
2011-09-09 22:47:49 -07:00
parent df3ca4d94a
commit 5f4e30ed1d
22 changed files with 1997 additions and 83 deletions
+32
View File
@@ -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")
})