equal
deleted
inserted
replaced
1 function test_serializer() { |
|
2 module("Serializer basic tests", {setup: function() { |
|
3 this.dt = new IriSP.DataLoader(); |
|
4 this.ser = new IriSP.Serializer(this.dt, "http://google.com"); |
|
5 }}); |
|
6 |
|
7 test("init the serializer with a DataLoader and an url", function() { |
|
8 |
|
9 equal( this.ser._DataLoader, this.dt, "The dataloader reference is copied to the object." ); |
|
10 equal( this.ser._url, "http://google.com", "The url has been copied as well." ); |
|
11 deepEqual( this.ser._data, [], "The serializer data is not defined." ); |
|
12 }); |
|
13 |
|
14 test("check that the serialize and deserialize abstract functions are defined", function() { |
|
15 notEqual(this.ser.serialize, undefined, ".serialize is defined"); |
|
16 notEqual(this.ser.deserialize, undefined, ".deserialize is defined"); |
|
17 }); |
|
18 |
|
19 test("check if currentMedia() is defined", function() { |
|
20 |
|
21 }); |
|
22 |
|
23 }; |
|