aboutsummaryrefslogtreecommitdiffstats
path: root/test/angular-mocks.js
diff options
context:
space:
mode:
authorIgor Minar2010-09-23 05:37:17 +0800
committerMisko Hevery2010-09-23 17:23:52 +0800
commitacbcfbaf30f73f25df1c45da41132091e7022240 (patch)
treecbf6fea04061974197a5f6c9b9c983ce18b054ff /test/angular-mocks.js
parenta8931c9021fa15190927b913a66fb34deedf9e20 (diff)
downloadangular.js-acbcfbaf30f73f25df1c45da41132091e7022240.tar.bz2
$cookies service refactoring
- remove obsolete code in tests - add warning logs when maximum cookie limits (as specified via RFC 2965) were reached - non-string values will now get dropped - after each update $cookies hash will reflect the actual state of browser cookies this means that if browser drops some cookies due to cookie overflow, $cookies will reflect that - $sessionStore got renamed to $cookieStore to avoid name conflicts with html5's sessionStore
Diffstat (limited to 'test/angular-mocks.js')
-rw-r--r--test/angular-mocks.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/angular-mocks.js b/test/angular-mocks.js
index a0d25042..5b5c9863 100644
--- a/test/angular-mocks.js
+++ b/test/angular-mocks.js
@@ -102,7 +102,9 @@ MockBrowser.prototype = {
if (value == undefined) {
delete this.cookieHash[name];
} else {
- this.cookieHash[name] = ""+value;
+ if (isString(value)) {
+ this.cookieHash[name] = value;
+ }
}
} else {
return copy(this.cookieHash);