diff --git a/plugins/facebook/popcorn.facebook.js b/plugins/facebook/popcorn.facebook.js index 0366ed0da..faf2b65d7 100755 --- a/plugins/facebook/popcorn.facebook.js +++ b/plugins/facebook/popcorn.facebook.js @@ -192,7 +192,7 @@ setOptions[ options.type ](); if ( !target && Popcorn.plugin.debug ) { - throw new Error( "flickr target container doesn't exist" ); + throw new Error( "Facebook target container doesn't exist" ); } target && target.appendChild( options._container ); }, diff --git a/plugins/facebook/popcorn.facebook.unit.js b/plugins/facebook/popcorn.facebook.unit.js index 84fd5845f..1e01cf9dd 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" ); + } + });