Add Dummy Storage class

This commit is contained in:
Matias Alejo Garcia 2014-04-07 14:36:57 -03:00
parent 7141dee5c8
commit 6b2d3cda35
2 changed files with 33 additions and 0 deletions

18
js/models/Storage.js Normal file
View File

@ -0,0 +1,18 @@
'use strict';
var imports = require('soop').imports();
function Storage() {
this.data = {};
}
Storage.prototype.read = function(k) {
return this.data[k];
};
Storage.prototype.save = function(k,v) {
this.data[k]=v;
};
module.exports = require('soop')(Storage);

15
test/test.storage.js Normal file
View File

@ -0,0 +1,15 @@
'use strict';
var chai = chai || require('chai');
var should = chai.should();
var copay = copay || {};
var Storage = copay.Storage || require('../js/models/Storage');
describe('Storage model', function() {
it('should create an instance', function () {
var s = new Storage();
should.exist(s);
});
});