diff options
Diffstat (limited to 'test/servicesSpec.js')
| -rw-r--r-- | test/servicesSpec.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js index eebcf7dc..0569c54a 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -696,20 +696,14 @@ describe("service", function(){ }); - it('should ignore non-string values when asked to create a cookie', function() { + it('should drop or reset any cookie that was set to a non-string value', function() { scope.$cookies.nonString = [1, 2, 3]; - scope.$eval(); - expect($browser.cookies()).toEqual({'preexisting': 'oldCookie'}); - expect(scope.$cookies).toEqual({'preexisting': 'oldCookie'}); - }); - - - it('should drop any null or undefined properties', function() { scope.$cookies.nullVal = null; scope.$cookies.undefVal = undefined; + scope.$cookies.preexisting = function(){}; scope.$eval(); - expect($browser.cookies()).toEqual({'preexisting': 'oldCookie'}); + expect(scope.$cookies).toEqual({'preexisting': 'oldCookie'}); }); |
