@@ -55,7 +55,7 @@ describe('DGMeta', function () {
5555 } ) ;
5656
5757 it ( 'should click on map' , function ( ) {
58- origin . setTileData ( '78713:43453:17:256 ' , demoData ) ;
58+ origin . setTileData ( '78713:43453:17:256x256 ' , demoData ) ;
5959 spy = sinon . spy ( ) ;
6060 meta . addTo ( map ) ;
6161
@@ -71,7 +71,7 @@ describe('DGMeta', function () {
7171 it ( 'getTileData should NOT call ajax and return false' , function ( ) {
7272 var data ;
7373
74- data = origin . getTileData ( '124:12:42:256 ' ) ;
74+ data = origin . getTileData ( '124:12:42:256x256 ' ) ;
7575
7676 expect ( data ) . to . not . be . ok ( ) ;
7777 //ajax should not be called since empty url provided
@@ -81,9 +81,9 @@ describe('DGMeta', function () {
8181 it ( 'flush should clear cache' , function ( ) {
8282 var chain , data ;
8383
84- origin . setTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } , demoData ) ;
84+ origin . setTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } , demoData ) ;
8585 chain = origin . flush ( ) ;
86- data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
86+ data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
8787
8888 expect ( data ) . to . not . be . ok ( ) ;
8989 // check for returning this
@@ -98,7 +98,7 @@ describe('DGMeta', function () {
9898 data , chain ;
9999
100100 chain = origin . setURL ( 'http://demo/data' ) ;
101- data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
101+ data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
102102
103103 expect ( data ) . to . not . be . ok ( ) ;
104104 expect ( ajaxSpy . callCount ) . to . be . eql ( 1 ) ;
@@ -126,7 +126,7 @@ describe('DGMeta', function () {
126126 var data ;
127127
128128 origin . setURL ( 'http://demo/data' ) ;
129- data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
129+ data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
130130
131131 expect ( data ) . to . not . be . ok ( ) ;
132132 expect ( ajaxSpy . callCount ) . to . be . eql ( 1 ) ;
@@ -135,9 +135,9 @@ describe('DGMeta', function () {
135135 it ( 'setTileData by object key should write and cache tileData' , function ( ) {
136136 var chain , data ;
137137
138- chain = origin . setTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } , demoData ) ;
138+ chain = origin . setTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } , demoData ) ;
139139
140- data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
140+ data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
141141 expect ( data ) . to . be . a ( 'object' ) ;
142142 expect ( ajaxSpy . callCount ) . to . be . eql ( 0 ) ;
143143 // check for returning this
@@ -147,9 +147,9 @@ describe('DGMeta', function () {
147147 it ( 'setTileData by string key should write and cache tileData' , function ( ) {
148148 var chain , data ;
149149
150- chain = origin . setTileData ( '124:12:42:256 ' , demoData ) ;
150+ chain = origin . setTileData ( '124:12:42:256x256 ' , demoData ) ;
151151
152- data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
152+ data = origin . getTileData ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
153153 expect ( data ) . to . be . a ( 'object' ) ;
154154 expect ( ajaxSpy . callCount ) . to . be . eql ( 0 ) ;
155155 // check for returning this
@@ -159,9 +159,9 @@ describe('DGMeta', function () {
159159 it ( 'getTileKey should string tileKey representation' , function ( ) {
160160 var tileKey ;
161161
162- tileKey = origin . getTileKey ( { x : 124 , y : 12 , z : 42 , key : 256 } ) ;
162+ tileKey = origin . getTileKey ( { x : 124 , y : 12 , z : 42 , key : '256x256' } ) ;
163163
164- expect ( tileKey ) . to . be . eql ( '124:12:42:256 ' ) ;
164+ expect ( tileKey ) . to . be . eql ( '124:12:42:256x256 ' ) ;
165165 } ) ;
166166 } ) ;
167167} ) ;
0 commit comments