fix tests and stringify for localstorage

This commit is contained in:
Matias Alejo Garcia 2014-08-15 12:43:43 -04:00
commit 18aadede29
9 changed files with 75 additions and 76 deletions

View file

@ -11,8 +11,8 @@ FakeStorage.prototype._setPassphrase = function(password) {
this.storage.passphrase = password;
};
FakeStorage.prototype.setGlobal = function(id, payload) {
this.storage[id] = payload;
FakeStorage.prototype.setGlobal = function(id, v) {
this.storage[id] = typeof v === 'object' ? JSON.stringify(v) : v;
};
FakeStorage.prototype.getGlobal = function(id) {