unittests/tests/serializer.js
author hamidouk
Tue, 25 Oct 2011 14:33:31 +0200
branchpopcorn-port
changeset 142 caefb8b4218f
parent 83 1fb63a1a8ac3
child 185 2ccec6201261
permissions -rw-r--r--
fixed div id in test data.

function test_serializer() {
  module("Serializer basic tests", {setup: function() {
    this.dt = new IriSP.DataLoader();
    this.ser = new IriSP.Serializer(this.dt, "http://google.com");
  }});
  
  test("init the serializer with a DataLoader and an url", function() {
      
      equal( this.ser._DataLoader, this.dt, "The dataloader reference is copied to the object." );
      equal( this.ser._url, "http://google.com", "The url has been copied as well." );
      equal( this.ser._data, undefined, "The serializer data is not defined." );
  });
  
  test("check that the serialize and deserialize abstract functions are defined", function() {
      notEqual(this.ser.serialize, undefined, ".serialize is defined");
      notEqual(this.ser.deserialize, undefined, ".deserialize is defined");
  });
  
  test("check if currentMedia() is defined", function() {
  
  });

};