aboutsummaryrefslogtreecommitdiff
path: root/src/js/tests/mock-storage.js
blob: 71c667fd97b6a61640554ca7e2d7ccbf66ad1853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

var MockStorage = function() {
  this.store = {};
};

_.extend(MockStorage.prototype, {

  getItem: function(key) {
    return this.store[key];
  },

  setItem: function(key,value) {
    this.store[key] = value;
  },

  removeItem: function(key,value) {
    delete this.store[key];
  },

});