unittests/tests/module.js
branchpopcorn-port
changeset 461 a9c5eeca190c
equal deleted inserted replaced
460:7071ccbc315a 461:a9c5eeca190c
       
     1 /* test module for base widgets */
       
     2 function test_module() {
       
     3   module("Base module testing", 
       
     4   {setup : function() {
       
     5     this.Popcorn = Popcorn("#popcorn-div");
       
     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 config = { a : 540};
       
    14     var mod = new IriSP.Module(this.Popcorn, config, this.ser);
       
    15     deepEqual(mod._config, config, "Check that config is copied correctly");
       
    16   });
       
    17 };