From: Matthew Schranz Date: Fri, 23 Sep 2011 19:30:39 +0000 (-0400) Subject: [#733] Added Test for Empty Block in Facebook Plugin X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d9c14a296c4fe3767aa4a2514ed94ea2c342bb84;p=popcorn-js.git [#733] Added Test for Empty Block in Facebook Plugin --- diff --git a/plugins/facebook/popcorn.facebook.unit.js b/plugins/facebook/popcorn.facebook.unit.js index 84fd584..1e01cf9 100755 --- a/plugins/facebook/popcorn.facebook.unit.js +++ b/plugins/facebook/popcorn.facebook.unit.js @@ -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" ); + } + });