]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#369] default start and end test
authorScottDowne <sdowne@learn.senecac.on.ca>
Fri, 25 Feb 2011 17:00:40 +0000 (12:00 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Fri, 25 Feb 2011 17:00:40 +0000 (12:00 -0500)
test/popcorn.unit.js

index d2643165f6147d30d3be360ace72fa5d4b94e1c4..b4b1e7cc9b051f81a139f7642815d05c7249e3b8 100755 (executable)
@@ -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();
 
 });