unittests/tests/module.js
author hamidouk
Fri, 27 Jan 2012 17:10:33 +0100
branchpopcorn-port
changeset 739 d28b9acfc445
parent 461 a9c5eeca190c
permissions -rw-r--r--
moved the sliderWidget from percents to pixels. It now has a satisfying display.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
461
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     1
/* test module for base widgets */
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     2
function test_module() {
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     3
  module("Base module testing", 
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     4
  {setup : function() {
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     5
    this.Popcorn = Popcorn("#popcorn-div");
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     6
    
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     7
    this.dt = new IriSP.DataLoader();
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     8
    this.ser = new IriSP.JSONSerializer(this.dt, "/url");
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
     9
  } }
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    10
  );
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    11
  
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    12
  test("test initialisation", function() {
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    13
    var config = { a : 540};
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    14
    var mod = new IriSP.Module(this.Popcorn, config, this.ser);
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    15
    deepEqual(mod._config, config, "Check that config is copied correctly");
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    16
  });
a9c5eeca190c added modules and tbe tests to test them.
hamidouk
parents:
diff changeset
    17
};