Merge pull request #865 from maraoz/feature/force-testnet

Feature: allow to force network from config
This commit is contained in:
Matias Alejo Garcia 2014-07-08 15:35:31 -03:00
commit b0ff5494e0
6 changed files with 34 additions and 2 deletions

View file

@ -8,6 +8,7 @@ try {
} catch (e) {
var copay = require('../copay'); //node
}
var copayConfig = require('../config');
var Wallet = require('../js/models/core/Wallet');
var Structure = copay.Structure;
var Storage = require('./mocks/FakeStorage');
@ -950,4 +951,14 @@ describe('Wallet model', function() {
});
});
describe('#forceNetwork in config', function() {
it('should throw if network is different', function() {
var backup = copayConfig.forceNetwork;
copayConfig.forceNetwork = true;
config.networkName = 'livenet';
cachedCreateW2.should.throw(Error);
copayConfig.forceNetwork = backup;
});
});
});