unittests/tests/JSONSerializer.js
branchpopcorn-port
changeset 65 6a8cae20f190
child 69 3f7a2e8a948f
equal deleted inserted replaced
64:b13359f9ce48 65:6a8cae20f190
       
     1 function test_JSONSerializer() {
       
     2   module("JSON Serializer tests", 
       
     3     { setup: function() {
       
     4       this.dt = new IriSP.DataLoader();
       
     5       }
       
     6     }
       
     7     );    
       
     8     
       
     9     test("should return the correct JSON", function() {
       
    10       var arr = ["ab", {"de" : "fg"}, "lp"];
       
    11       var serializer = new IriSP.JSONSerializer(this.dt);
       
    12 
       
    13       equal(serializer.serialize(arr), JSON.stringify(arr), "assert that the outputted json is correct");
       
    14     });
       
    15 
       
    16 };