Fix tests

This commit is contained in:
Esteban Ordano 2014-09-02 18:43:40 -03:00
commit 61aea8db3d
2 changed files with 8 additions and 11 deletions

View file

@ -133,7 +133,7 @@ describe('TxProposal', function() {
builderObj: b.toObj(), builderObj: b.toObj(),
inputChainPaths: ['m/1'], inputChainPaths: ['m/1'],
}); });
}).should.throw('Invalid'); }).should.throw('Invalid or Incompatible Backup Detected');
}); });

View file

@ -432,16 +432,13 @@ describe('WalletFactory model', function() {
wf.network.start.getCall(0).args[0].privkey.length.should.equal(64); //privkey is hex of private key buffer wf.network.start.getCall(0).args[0].privkey.length.should.equal(64); //privkey is hex of private key buffer
}); });
}); });
describe('dont break backwards compatibility of wallets', function() { describe('break backwards compatibility with older versions', function() {
it('should be able to import unencrypted legacy wallet TxProposal: v0', function() { it('should\'nt be able to import unencrypted legacy wallet TxProposal: v0', function() {
var wf = new WalletFactory(config, '0.0.5');
var w = wf.fromObj(JSON.parse(legacyO));
should.exist(w); (function() {
w.id.should.equal('55d4bd062d32f90a'); var wf = new WalletFactory(config, '0.0.5');
should.exist(w.publicKeyRing.getCopayerId); var w = wf.fromObj(JSON.parse(legacyO));
should.exist(w.txProposals.toObj()); }).should.throw('Invalid or Incompatible Backup Detected');
should.exist(w.privateKey.toObj());
}); });
it('should be able to import simple 1-of-1 encrypted legacy testnet wallet', function(done) { it('should be able to import simple 1-of-1 encrypted legacy testnet wallet', function(done) {