update to master

This commit is contained in:
Matias Alejo Garcia 2014-06-13 11:30:48 -03:00
commit 4fe58ec446
5 changed files with 54 additions and 42 deletions

View file

@ -1,15 +1,15 @@
'use strict';
if (typeof process === 'undefined' || !process.version) {
if (typeof process === 'undefined' || !process.version) {
// browser
var chai = chai || require('chai');
var should = chai.should();
var copay = copay || require('../copay');
var LocalPlain = copay.StorageLocalPlain;
var chai = chai || require('chai');
var should = chai.should();
var copay = copay || require('../copay');
var LocalPlain = copay.StorageLocalPlain;
describe('Storage/LocalPlain model', function() {
describe.skip('Storage/LocalPlain model', function() {
it('should create an instance', function () {
it('should create an instance', function() {
var s = new LocalPlain();
should.exist(s);
});
@ -17,7 +17,12 @@ if (typeof process === 'undefined' || !process.version) {
describe('#setFromObj', function() {
it('should set keys from an object', function() {
localStorage.clear();
var obj = {test:'testval', opts: {name: 'testname'}};
var obj = {
test: 'testval',
opts: {
name: 'testname'
}
};
var storage = new LocalPlain();
storage.setFromObj('walletId', obj);
storage.get('walletId', 'test').should.equal('testval');