From 1716b0fdb5023ff45f0d28e5266db053aa64ccc6 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 20 Sep 2012 16:31:10 -0700 Subject: remove src's --- js/tests/unit/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tests/unit/bootstrap-carousel.js') diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js index 4c93c7b18..5ac9fb2d8 100644 --- a/js/tests/unit/bootstrap-carousel.js +++ b/js/tests/unit/bootstrap-carousel.js @@ -26,7 +26,7 @@ $(function () { }) test("should fire slide event with relatedTarget", function () { - var template = '' + var template = '' $.support.transition = false stop() $(template) -- cgit v1.2.3 From 432eaff29cc05f488fc0a1c87d1e28d86ef3641e Mon Sep 17 00:00:00 2001 From: dmitriybudnik Date: Mon, 15 Oct 2012 21:55:32 +0300 Subject: Fixed copy/paste caused typo --- js/tests/unit/bootstrap-carousel.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'js/tests/unit/bootstrap-carousel.js') diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js index 5ac9fb2d8..fbcbb5b17 100644 --- a/js/tests/unit/bootstrap-carousel.js +++ b/js/tests/unit/bootstrap-carousel.js @@ -37,6 +37,26 @@ $(function () { start(); }) .carousel('next') - }) + test("should set interval from data attribute", function () { + var template = $(''); + template.attr("data-interval", 1814); + + template.appendTo("body"); + $('[data-slide]').first().click(); + ok($('#myCarousel').data('carousel').options.interval == 1814); + $('#myCarousel').remove(); + + template.appendTo("body").attr("data-modal", "foobar"); + $('[data-slide]').first().click(); + ok($('#myCarousel').data('carousel').options.interval == 1814, "even if there is an data-modal attribute set"); + $('#myCarousel').remove(); + + template.appendTo("body"); + $('[data-slide]').first().click(); + $('#myCarousel').attr('data-interval', 1860); + $('[data-slide]').first().click(); + ok($('#myCarousel').data('carousel').options.interval == 1814, "attributes should be read only on intitialization"); + $('#myCarousel').remove(); + }) }) \ No newline at end of file -- cgit v1.2.3 From cd5596393049e5c22f17f7f99764be1bfbc43ecc Mon Sep 17 00:00:00 2001 From: Dmitriy Budnik Date: Tue, 16 Oct 2012 09:49:01 +0300 Subject: fixed test --- js/tests/unit/bootstrap-carousel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/tests/unit/bootstrap-carousel.js') diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js index fbcbb5b17..97ea942de 100644 --- a/js/tests/unit/bootstrap-carousel.js +++ b/js/tests/unit/bootstrap-carousel.js @@ -37,11 +37,12 @@ $(function () { start(); }) .carousel('next') + }) test("should set interval from data attribute", function () { var template = $(''); template.attr("data-interval", 1814); - + template.appendTo("body"); $('[data-slide]').first().click(); ok($('#myCarousel').data('carousel').options.interval == 1814); @@ -51,7 +52,7 @@ $(function () { $('[data-slide]').first().click(); ok($('#myCarousel').data('carousel').options.interval == 1814, "even if there is an data-modal attribute set"); $('#myCarousel').remove(); - + template.appendTo("body"); $('[data-slide]').first().click(); $('#myCarousel').attr('data-interval', 1860); -- cgit v1.2.3 From ae0ba0686efcbf73116a21eb9aff3f9bede4a489 Mon Sep 17 00:00:00 2001 From: Dmitriy Budnik Date: Tue, 16 Oct 2012 11:16:38 +0300 Subject: set spesific assertions count for test --- js/tests/unit/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tests/unit/bootstrap-carousel.js') diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js index 97ea942de..8bd1b62ba 100644 --- a/js/tests/unit/bootstrap-carousel.js +++ b/js/tests/unit/bootstrap-carousel.js @@ -39,7 +39,7 @@ $(function () { .carousel('next') }) - test("should set interval from data attribute", function () { + test("should set interval from data attribute", 3,function () { var template = $(''); template.attr("data-interval", 1814); -- cgit v1.2.3