unittests/tests/JSONSerializer.js
author hamidouk
Wed, 12 Oct 2011 13:59:38 +0200
branchpopcorn-port
changeset 68 5469b2b9743f
parent 65 6a8cae20f190
child 69 3f7a2e8a948f
permissions -rw-r--r--
fixed an error in dataloader.js test.

function test_JSONSerializer() {
  module("JSON Serializer tests", 
    { setup: function() {
      this.dt = new IriSP.DataLoader();
      }
    }
    );    
    
    test("should return the correct JSON", function() {
      var arr = ["ab", {"de" : "fg"}, "lp"];
      var serializer = new IriSP.JSONSerializer(this.dt);

      equal(serializer.serialize(arr), JSON.stringify(arr), "assert that the outputted json is correct");
    });

};