]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#733] Added Test for Empty Block in Facebook Plugin
authorMatthew Schranz <schranz.m@gmail.com>
Fri, 23 Sep 2011 19:30:39 +0000 (15:30 -0400)
committerMatthew Schranz <schranz.m@gmail.com>
Fri, 23 Sep 2011 19:30:39 +0000 (15:30 -0400)
plugins/facebook/popcorn.facebook.unit.js

index 84fd5845fe98207b65b2350ae19dd8a4b95558fd..1e01cf9dd633d9411e8421c81372ac3587b7f014 100755 (executable)
@@ -83,5 +83,23 @@ test("Popcorn Facebook Plugin", function () {
     ok ( document.getElementById( "facepilediv" ).innerHTML, "Facepilediv is not empty at 0:05 (expected)" );
     plus();
   });
+  
+});
+
+test( "Test Empty Block", function () {
+
+  Popcorn.plugin.debug = true;
+
+  var pop = Popcorn( "#video" );
+  
+  expect( 1 );
+  
+  // Tests for thrown Error on emtpy block
+  try {
+    pop.facebook({});
+  } catch( e ) {
+    ok( true, "Empty event was caught by debugger" );
+  }
+  
 });