@@ -276,7 +276,7 @@ test('store.update(array, updateFunction)', function (t) {
276276} )
277277
278278test ( 'store.update(object) updates updatedAt timestamp' , function ( t ) {
279- t . plan ( 4 )
279+ t . plan ( 5 )
280280
281281 var clock = lolex . install ( 0 , [ 'Date' ] )
282282 var db = dbFactory ( )
@@ -300,6 +300,7 @@ test('store.update(object) updates updatedAt timestamp', function (t) {
300300
301301 store . on ( 'update' , function ( object ) {
302302 t . is ( object . id , 'shouldHaveTimestamps' , 'resolves doc' )
303+ t . is ( typeof object . deletedAt , 'undefined' , 'deletedAt shouldnt be set' )
303304 t . ok ( isValidDate ( object . updatedAt ) , 'updatedAt should be a valid date' )
304305 t . is ( now ( ) , object . updatedAt , 'updatedAt should be the same time as right now' )
305306 t . not ( object . createdAt , object . updatedAt , 'createdAt and updatedAt should not be the same' )
@@ -309,7 +310,7 @@ test('store.update(object) updates updatedAt timestamp', function (t) {
309310} )
310311
311312test ( 'store.update([objects]) updates updatedAt timestamps' , function ( t ) {
312- t . plan ( 8 )
313+ t . plan ( 10 )
313314
314315 var clock = lolex . install ( 0 , [ 'Date' ] )
315316 var db = dbFactory ( )
@@ -334,6 +335,7 @@ test('store.update([objects]) updates updatedAt timestamps', function (t) {
334335
335336 store . on ( 'update' , function ( object ) {
336337 t . ok ( object . id , 'resolves doc' )
338+ t . is ( typeof object . deletedAt , 'undefined' , 'deletedAt shouldnt be set' )
337339 t . ok ( isValidDate ( object . updatedAt ) , 'updatedAt should be a valid date' )
338340 t . is ( now ( ) , object . updatedAt , 'updatedAt should be the same time as right now' )
339341 t . not ( object . createdAt , object . updatedAt , 'createdAt and updatedAt should not be the same' )
0 commit comments