From: David Seifried Date: Thu, 23 Jun 2011 19:41:22 +0000 (-0400) Subject: [#594] Added unit tests X-Git-Tag: v0.7^2~11^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8bf4b3a4b9239b5e5d13a35d9b68e47c05e1fd89;p=popcorn-js.git [#594] Added unit tests --- diff --git a/plugins/attribution/popcorn.attribution.unit.js b/plugins/attribution/popcorn.attribution.unit.js index aff0e1b..7a40e22 100755 --- a/plugins/attribution/popcorn.attribution.unit.js +++ b/plugins/attribution/popcorn.attribution.unit.js @@ -1,7 +1,7 @@ test("Popcorn attribution Plugin", function () { var popped = Popcorn("#video"), - expects = 9, + expects = 10, count = 0, setupId, attributiondiv = document.getElementById('attribdiv'); @@ -28,7 +28,6 @@ test("Popcorn attribution Plugin", function () { end: 2, // seconds nameofwork: "A Shared Culture", copyrightholder:"Jesse Dylan", - license: "CC-BY-N6", licenseurl: "http://creativecommons.org/licenses/by-nc/2.0/", target: 'attribdiv' } ) @@ -60,6 +59,9 @@ test("Popcorn attribution Plugin", function () { equals (attributiondiv.children[1].style.display , "inline", "second attribution is visible on the page" ); plus(); + + equals ( typeof popped.data.trackEvents.byStart[ 1 ]._license, "undefined", "undefined license is properly being handled" ); + plus(); }); popped.exec( 4, function() {