mirror of https://github.com/BTCPrivate/copay.git
Add Dummy Storage class
This commit is contained in:
parent
7141dee5c8
commit
6b2d3cda35
|
@ -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);
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue