unittests/tests/widget.js
branchpopcorn-port
changeset 74 d7a7d7216371
child 114 eda061f1aa75
equal deleted inserted replaced
73:a8192c57c87d 74:d7a7d7216371
       
     1 /* test module for base widgets */
       
     2 function test_widget() {
       
     3   module("Base widget testing", 
       
     4   {setup : function() {
       
     5     this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4");
       
     6     
       
     7     this.dt = new IriSP.DataLoader();
       
     8     this.ser = new IriSP.JSONSerializer(this.dt, "/url");
       
     9   } }
       
    10   );
       
    11   
       
    12   test("test initialisation", function() {
       
    13     var wid = new IriSP.Widget(this.Popcorn, {parent: "widget-div"}, this.ser);
       
    14     deepEqual(wid._config, {parent: "widget-div"}, "Check if the parent div is set correctly");
       
    15     
       
    16   });
       
    17   
       
    18   
       
    19 };