unittests/mockSerializer.js
branchpopcorn-port
changeset 128 f3fec80dd31c
parent 80 8d0dbb1e62c8
child 157 73bce42a3ed3
equal deleted inserted replaced
127:3ce493c93d6c 128:f3fec80dd31c
     1 /* mock serializer, for unit testing. This file is separated from data.js
     1 /* mock serializer, for unit testing. This file is separated from data.js
     2    because the stub data is huge an we don't want to ship it with the rest
     2    because the stub data is huge an we don't want to ship it with the rest
     3    of the app */
     3    of the app */
     4    
     4 
     5 IriSP.MockSerializer = function(DataLoader, url) {
     5 IriSP.MockSerializer = function(DataLoader, url) {
     6   IriSP.Serializer.call(this, DataLoader, url);
     6   IriSP.Serializer.call(this, DataLoader, url);
     7 
     7 
     8   this._data = { "tags": [
     8   this._data = { "tags": [
     9       {
     9       {
  1460         }
  1460         }
  1461       ]
  1461       ]
  1462 };
  1462 };
  1463 };
  1463 };
  1464 
  1464 
       
  1465 IriSP.MockSerializer.prototype = new IriSP.Serializer();   
       
  1466 
  1465 IriSP.MockSerializer.prototype.currentMedia = function() {
  1467 IriSP.MockSerializer.prototype.currentMedia = function() {
  1466   return this._data.medias[0];
  1468   return this._data.medias[0];
  1467 };
  1469 };