@@ -429,22 +429,11 @@ describe("service", function(){
429
429
430
430
it ( 'should serialize objects to json' , function ( ) {
431
431
scope . $sessionStore . put ( 'objectCookie' , { id : 123 , name : 'blah' } ) ;
432
- scope . $eval ( ) ;
432
+ scope . $eval ( ) ; //force eval in test
433
433
expect ( scope . $browser . cookies ( ) ) . toEqual ( { 'objectCookie' : '{"id":123,"name":"blah"}' } ) ;
434
434
} ) ;
435
435
436
436
437
- it ( 'should return all persisted items as a has via getAll' , function ( ) {
438
- expect ( scope . $sessionStore . getAll ( ) ) . toEqual ( { } ) ;
439
-
440
- scope . $sessionStore . put ( 'object1' , { id :1 , foo :'bar1' } ) ;
441
- scope . $sessionStore . put ( 'object2' , { id :2 , foo :'bar2' } ) ;
442
-
443
- expect ( scope . $sessionStore . getAll ( ) ) . toEqual ( { 'object1' :{ id :1 , foo :'bar1' } ,
444
- 'object2' :{ id :2 , foo :'bar2' } } ) ;
445
- } ) ;
446
-
447
-
448
437
it ( 'should deserialize json to object' , function ( ) {
449
438
scope . $browser . cookies ( 'objectCookie' , '{"id":123,"name":"blah"}' ) ;
450
439
scope . $browser . poll ( ) ;
@@ -454,8 +443,7 @@ describe("service", function(){
454
443
455
444
it ( 'should delete objects from the store when remove is called' , function ( ) {
456
445
scope . $sessionStore . put ( 'gonner' , { "I'll" :"Be Back" } ) ;
457
- // TODO: Is this $eval necessary (why was it not here before?)
458
- scope . $eval ( ) ;
446
+ scope . $eval ( ) ; //force eval in test
459
447
expect ( scope . $browser . cookies ( ) ) . toEqual ( { 'gonner' : '{"I\'ll":"Be Back"}' } ) ;
460
448
} ) ;
461
449
0 commit comments