@@ -20,30 +20,30 @@ describe('$cacheFactory integration', function () {
20
20
} ) ;
21
21
22
22
DS . find ( 'Comment' , 5 ) . then ( function ( comment ) {
23
- assert . deepEqual ( comment , {
23
+ assert . deepEqual ( angular . toJson ( comment ) , angular . toJson ( {
24
24
id : 5 ,
25
25
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' ) ;
28
28
} , function ( err ) {
29
29
console . error ( err . stack ) ;
30
30
fail ( 'Should not have rejected!' ) ;
31
31
} ) ;
32
32
33
33
$httpBackend . flush ( ) ;
34
34
35
- assert . deepEqual ( DS . get ( 'Comment' , 5 ) , {
35
+ assert . deepEqual ( angular . toJson ( DS . get ( 'Comment' , 5 ) ) , angular . toJson ( {
36
36
id : 5 ,
37
37
text : 'test'
38
- } , 'The comment is now in the store' ) ;
38
+ } ) , 'The comment is now in the store' ) ;
39
39
assert . isNumber ( DS . lastModified ( 'Comment' , 5 ) ) ;
40
40
assert . isNumber ( DS . lastSaved ( 'Comment' , 5 ) ) ;
41
41
42
42
setTimeout ( function ( ) {
43
- assert . deepEqual ( cache . get ( 5 ) , {
43
+ assert . deepEqual ( angular . toJson ( cache . get ( 5 ) ) , angular . toJson ( {
44
44
id : 5 ,
45
45
text : 'test'
46
- } , 'should be in the cache' ) ;
46
+ } ) , 'should be in the cache' ) ;
47
47
48
48
assert . equal ( lifecycle . beforeInject . callCount , 1 , 'beforeInject should have been called' ) ;
49
49
assert . equal ( lifecycle . afterInject . callCount , 1 , 'afterInject should have been called' ) ;
0 commit comments