@@ -20,30 +20,30 @@ describe('$cacheFactory integration', function () {
2020 } ) ;
2121
2222 DS . find ( 'Comment' , 5 ) . then ( function ( comment ) {
23- assert . deepEqual ( comment , {
23+ assert . deepEqual ( angular . toJson ( comment ) , angular . toJson ( {
2424 id : 5 ,
2525 text : 'test'
26- } ) ;
27- assert . deepEqual ( cache . get ( 5 ) , comment , 'should be in the cache' ) ;
26+ } ) ) ;
27+ assert . deepEqual ( angular . toJson ( cache . get ( 5 ) ) , angular . toJson ( comment ) , 'should be in the cache' ) ;
2828 } , function ( err ) {
2929 console . error ( err . stack ) ;
3030 fail ( 'Should not have rejected!' ) ;
3131 } ) ;
3232
3333 $httpBackend . flush ( ) ;
3434
35- assert . deepEqual ( DS . get ( 'Comment' , 5 ) , {
35+ assert . deepEqual ( angular . toJson ( DS . get ( 'Comment' , 5 ) ) , angular . toJson ( {
3636 id : 5 ,
3737 text : 'test'
38- } , 'The comment is now in the store' ) ;
38+ } ) , 'The comment is now in the store' ) ;
3939 assert . isNumber ( DS . lastModified ( 'Comment' , 5 ) ) ;
4040 assert . isNumber ( DS . lastSaved ( 'Comment' , 5 ) ) ;
4141
4242 setTimeout ( function ( ) {
43- assert . deepEqual ( cache . get ( 5 ) , {
43+ assert . deepEqual ( angular . toJson ( cache . get ( 5 ) ) , angular . toJson ( {
4444 id : 5 ,
4545 text : 'test'
46- } , 'should be in the cache' ) ;
46+ } ) , 'should be in the cache' ) ;
4747
4848 assert . equal ( lifecycle . beforeInject . callCount , 1 , 'beforeInject should have been called' ) ;
4949 assert . equal ( lifecycle . afterInject . callCount , 1 , 'afterInject should have been called' ) ;
0 commit comments