Skip to content

Commit

Permalink
[#733] Added Test for Empty Block in Facebook Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mjschranz committed Sep 23, 2011
1 parent 99c0683 commit d9c14a2
Showing 1 changed file with 18 additions and 0 deletions.
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 d9c14a2

Please sign in to comment.