Browse Source

Merge pull request #7 from isocolsky/test/many_addresses

add test to create many addresses simultaneously
activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
41c561b6cf
  1. 18
      test/integration.js

18
test/integration.js

@ -586,6 +586,24 @@ describe('Copay server', function() {
});
});
it('should create many addresses on simultaneous requests', function(done) {
helpers.createAndJoinWallet('123', 2, 2, function(err, wallet) {
async.map(_.range(10), function (i, cb) {
server.createAddress({
walletId: '123',
isChange: false,
}, cb);
}, function (err, addresses) {
addresses.length.should.equal(10);
addresses[0].path.should.equal('m/2147483647/0/1');
addresses[9].path.should.equal('m/2147483647/0/10');
// No two identical addresses
_.keys(_.groupBy(addresses, 'address')).length.should.equal(10);
done();
});
});
});
});
describe('#createTx', function() {

Loading…
Cancel
Save