diff options
Diffstat (limited to 'test/servicesSpec.js')
| -rw-r--r-- | test/servicesSpec.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js index 6fa2c5f5..28bde598 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -429,22 +429,11 @@ describe("service", function(){ it('should serialize objects to json', function() { scope.$sessionStore.put('objectCookie', {id: 123, name: 'blah'}); - scope.$eval(); + scope.$eval(); //force eval in test expect(scope.$browser.cookies()).toEqual({'objectCookie': '{"id":123,"name":"blah"}'}); }); - it('should return all persisted items as a has via getAll', function() { - expect(scope.$sessionStore.getAll()).toEqual({}); - - scope.$sessionStore.put('object1', {id:1,foo:'bar1'}); - scope.$sessionStore.put('object2', {id:2,foo:'bar2'}); - - expect(scope.$sessionStore.getAll()).toEqual({'object1':{id:1,foo:'bar1'}, - 'object2':{id:2,foo:'bar2'}}); - }); - - it('should deserialize json to object', function() { scope.$browser.cookies('objectCookie', '{"id":123,"name":"blah"}'); scope.$browser.poll(); @@ -454,8 +443,7 @@ describe("service", function(){ it('should delete objects from the store when remove is called', function() { scope.$sessionStore.put('gonner', { "I'll":"Be Back"}); - // TODO: Is this $eval necessary (why was it not here before?) - scope.$eval(); + scope.$eval(); //force eval in test expect(scope.$browser.cookies()).toEqual({'gonner': '{"I\'ll":"Be Back"}'}); }); |
