middleman/middleman-core/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-carousel.js
2013-05-09 14:41:26 -07:00

28 lines
745 B
JavaScript
Executable file

$(function () {
module("bootstrap-carousel")
test("should be defined on jquery object", function () {
ok($(document.body).carousel, 'carousel method is defined')
})
test("should return element", function () {
ok($(document.body).carousel()[0] == document.body, 'document.body returned')
})
test("should not fire sliden when slide is prevented", function () {
$.support.transition = false
stop();
$('<div class="carousel"/>')
.bind('slide', function (e) {
e.preventDefault();
ok(true);
start();
})
.bind('slid', function () {
ok(false);
})
.carousel('next')
})
})