]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#594] Added unit tests
authorDavid Seifried <david.c.seifried@gmail.com>
Thu, 23 Jun 2011 19:41:22 +0000 (15:41 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Thu, 23 Jun 2011 19:41:22 +0000 (15:41 -0400)
plugins/attribution/popcorn.attribution.unit.js

index aff0e1b274b62a5356261e23471a775575c2711e..7a40e22b015fb5f1fc1cbaf6314b7f147a09876e 100755 (executable)
@@ -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() {