From: ScottDowne Date: Fri, 25 Feb 2011 17:00:40 +0000 (-0500) Subject: [#369] default start and end test X-Git-Tag: v0.4~29 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=503d2fee4fb17ce54a39ec6d3639dc11080cd80d;p=popcorn-js.git [#369] default start and end test --- diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index d264316..b4b1e7c 100755 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -582,7 +582,7 @@ test("Plugin Factory", function () { var popped = Popcorn("#video"), methods = "load play pause currentTime mute volume roundTime exec removePlugin", - expects = 48, + expects = 50, count = 0; //expect(expects); @@ -593,6 +593,7 @@ test("Plugin Factory", function () { Popcorn.removePlugin("executor"); Popcorn.removePlugin("complicator"); Popcorn.removePlugin("closure"); + Popcorn.removePlugin("empty"); start(); } } @@ -781,6 +782,17 @@ test("Plugin Factory", function () { nick: "second closure track" }); + var testObj = {}; + + Popcorn.plugin("empty", testObj); + + popped.empty({}); + + ok( testObj.start, "default start function is generated" ); + plus(); + ok( testObj.end, "default end function is generated" ); + plus(); + popped.currentTime(0).play(); });