@@ -27,13 +27,7 @@ describe('Server', function() {
2727 { id : 2 , published : false , postId : 1 } ,
2828 { id : 3 , published : false , postId : 2 } ,
2929 { id : 4 , published : false , postId : 2 } ,
30- { id : 5 , published : false , postId : 2 } ,
31- { id : 6 , published : false , postId : 2 } ,
32- { id : 7 , published : false , postId : 2 } ,
33- { id : 8 , published : false , postId : 2 } ,
34- { id : 9 , published : false , postId : 2 } ,
35- { id : 10 , published : false , postId : 2 } ,
36- { id : 11 , published : false , postId : 2 }
30+ { id : 5 , published : false , postId : 2 }
3731 ]
3832
3933 db . refs = [
@@ -156,11 +150,11 @@ describe('Server', function() {
156150 describe ( 'GET /:resource?_start=&_limit=' , function ( ) {
157151 it ( 'should respond with a limited array' , function ( done ) {
158152 request ( server )
159- . get ( '/comments?_start=5 &_limit=3 ' )
153+ . get ( '/comments?_start=1 &_limit=1 ' )
160154 . expect ( 'Content-Type' , / j s o n / )
161155 . expect ( 'x-total-count' , db . comments . length . toString ( ) )
162156 . expect ( 'Access-Control-Expose-Headers' , 'X-Total-Count' )
163- . expect ( utils . limitArray ( db . comments , 5 , 3 ) )
157+ . expect ( db . comments . slice ( 1 , 2 ) )
164158 . expect ( 200 , done )
165159 } )
166160 } )
@@ -298,7 +292,7 @@ describe('Server', function() {
298292 . end ( function ( err , res ) {
299293 if ( err ) return done ( err )
300294 assert . equal ( db . posts . length , 1 )
301- assert . equal ( db . comments . length , 9 )
295+ assert . equal ( db . comments . length , 3 )
302296 done ( )
303297 } )
304298 } )
0 commit comments