From d86dae7d1727a88bc682ef27763565939b44690e Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 17 Sep 2015 11:34:46 -0300 Subject: [PATCH] test --- test/integration/server.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/integration/server.js b/test/integration/server.js index 096cc6e..2d5e57e 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -1078,6 +1078,32 @@ describe('Wallet service', function() { }); }); + it.only('should be able to get wallet info without actually joining', function(done) { + var copayerOpts = helpers.getSignedCopayerOpts({ + walletId: walletId, + name: 'me', + xPubKey: TestData.copayers[0].xPubKey_44H_0H_0H, + requestPubKey: TestData.copayers[0].pubKey_1H_0, + customData: 'dummy custom data', + dryRun: true, + }); + server.joinWallet(copayerOpts, function(err, result) { + should.not.exist(err); + should.exist(result); + should.not.exist(result.copayerId); + result.wallet.id.should.equal(walletId); + result.wallet.m.should.equal(1); + result.wallet.n.should.equal(2); + result.wallet.copayers.should.be.empty; + server.storage.fetchWallet(walletId, function(err, wallet) { + should.not.exist(err); + wallet.id.should.equal(walletId); + wallet.copayers.should.be.empty; + done(); + }); + }); + }); + it('should fail to join two wallets with same xPubKey', function(done) { var copayerOpts = helpers.getSignedCopayerOpts({ walletId: walletId,