renaming files

This commit is contained in:
Manuel Araoz 2014-04-16 11:55:18 -03:00
parent 8f15578bb4
commit 609ba4ef71
11 changed files with 14 additions and 14 deletions

2
API.js
View File

@ -11,7 +11,7 @@ API.prototype._init = function(opts) {
self.opts = opts; self.opts = opts;
var Wallet = require('soop').load('./js/models/core/Wallet', { var Wallet = require('soop').load('./js/models/core/Wallet', {
Storage: opts.Storage || require('./test/FakeStorage'), Storage: opts.Storage || require('./test/mocks/FakeStorage'),
Network: opts.Network || require('./js/models/network/WebRTC'), Network: opts.Network || require('./js/models/network/WebRTC'),
Blockchain: opts.Blockchain || require('./js/models/blockchain/Insight') Blockchain: opts.Blockchain || require('./js/models/blockchain/Insight')
}); });

View File

@ -7,12 +7,12 @@ module.exports.PrivateKey = require('./js/models/core/PrivateKey');
// components // components
var WebRTC = module.exports.WebRTC = require('./js/models/network/WebRTC'); var WebRTC = module.exports.WebRTC = require('./js/models/network/WebRTC');
var Insight = module.exports.Insight = require('./js/models/blockchain/Insight'); var Insight = module.exports.Insight = require('./js/models/blockchain/Insight');
var StoragePlain = module.exports.StoragePlain = require('./js/models/storage/Plain'); var StorageLocalPlain = module.exports.StorageLocalPlain = require('./js/models/storage/LocalPlain');
var StorageEncrypted = module.exports.StorageEncrypted = require('./js/models/storage/Encrypted'); var StorageLocalEncrypted = module.exports.StorageLocalEncrypted = require('./js/models/storage/LocalEncrypted');
module.exports.Wallet = require('soop').load('./js/models/core/Wallet',{ module.exports.Wallet = require('soop').load('./js/models/core/Wallet',{
Network: WebRTC, Network: WebRTC,
Blockchain: Insight, Blockchain: Insight,
Storage: StoragePlain, Storage: StorageLocalPlain,
}); });

View File

@ -2,7 +2,7 @@
var imports = require('soop').imports(); var imports = require('soop').imports();
//var buffertools = imports.buffertools || require('buffertools'); //var buffertools = imports.buffertools || require('buffertools');
var parent = imports.parent || require('./Plain'); var parent = imports.parent || require('./LocalPlain');
var id = 0; var id = 0;
function Storage() { function Storage() {

View File

@ -4,7 +4,7 @@ var chai = chai || require('chai');
var should = chai.should(); var should = chai.should();
var copay = copay || require('../copay'); var copay = copay || require('../copay');
var Wallet = require('soop').load('../js/models/core/Wallet', { var Wallet = require('soop').load('../js/models/core/Wallet', {
Storage: require('./FakeStorage'), Storage: require('./mocks/FakeStorage'),
Network: copay.WebRTC, Network: copay.WebRTC,
Blockchain: copay.Insight Blockchain: copay.Insight
}); });

View File

@ -5,19 +5,19 @@ if (typeof process === 'undefined' || !process.version) {
var chai = chai || require('chai'); var chai = chai || require('chai');
var should = chai.should(); var should = chai.should();
var copay = copay || require('../copay'); var copay = copay || require('../copay');
var Encrypted = copay.StorageEncrypted; var LocalEncrypted = copay.StorageLocalEncrypted;
describe('Storage/Encrypted model', function() { describe('Storage/LocalEncrypted model', function() {
var wid = 'fake-wallet-id'; var wid = 'fake-wallet-id';
var s = new Encrypted(); var s = new LocalEncrypted();
s._setPassphrase('mysupercoolpassword'); s._setPassphrase('mysupercoolpassword');
it('should create an instance', function() { it('should create an instance', function() {
var s = new Encrypted(); var s = new LocalEncrypted();
should.exist(s); should.exist(s);
}); });
it('should fail when encrypting without a password', function() { it('should fail when encrypting without a password', function() {
var s = new Encrypted(); var s = new LocalEncrypted();
(function(){s.set(wid, 'x', 1);}).should.throw(); (function(){s.set(wid, 'x', 1);}).should.throw();
}); });
it('should be able to encrypt and decrypt', function() { it('should be able to encrypt and decrypt', function() {

View File

@ -5,12 +5,12 @@ if (typeof process === 'undefined' || !process.version) {
var chai = chai || require('chai'); var chai = chai || require('chai');
var should = chai.should(); var should = chai.should();
var copay = copay || require('../copay'); var copay = copay || require('../copay');
var Plain = copay.StoragePlain; var LocalPlain = copay.StorageLocalPlain;
describe('Storage/Plain model', function() { describe('Storage/LocalPlain model', function() {
it('should create an instance', function () { it('should create an instance', function () {
var s = new Plain(); var s = new LocalPlain();
should.exist(s); should.exist(s);
}); });
}); });