Skip to content
Snippets Groups Projects
Commit 535aa8ad authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Test to make sure emails, siteInfo and managePage all have default values after clear.

parent 4ff22fd3
No related branches found
No related tags found
No related merge requests found
......@@ -71,12 +71,19 @@
});
test("clear", function() {
test("clear - there should be default values", function() {
storage.addEmail("testuser@testuser.com", {priv: "key"});
storage.clear();
var emails = storage.getEmails();
equal(_.size(emails), 0, "object should have no items");
// all fields *MUST* have default values or else synchronization of
// localStorage in IE8 across multiple browsing contexts becomes a problem.
// See issue #2206 and #1637
notEqual(typeof localStorage.emails, "undefined", "emails is defined");
notEqual(typeof localStorage.siteInfo, "undefined", "siteInfo is defined");
notEqual(typeof localStorage.managePage, "undefined", "managePage is defined");
});
test("invalidateEmail with valid email address", function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment