Skip to content

Commit

Permalink
Fixed typo in Facebook plug-in, added unit test for debug assertion […
Browse files Browse the repository at this point in the history
…#733]
  • Loading branch information
Christopher De Cairos committed Sep 23, 2011
2 parents 8c0be6c + a2cf9e4 commit 7bf49fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/facebook/popcorn.facebook.js
Expand Up @@ -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 );
},
Expand Down
18 changes: 18 additions & 0 deletions plugins/facebook/popcorn.facebook.unit.js
Expand Up @@ -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" );
}

});

0 comments on commit 7bf49fa

Please sign in to comment.