From afb96bf01e35afb53b3e62b657b468c69973c06a Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 30 Mar 2015 12:43:43 -0300 Subject: [PATCH] test new address notification --- test/integration/server.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/integration/server.js b/test/integration/server.js index b3d1c30..6708669 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -601,14 +601,23 @@ describe('Copay server', function() { }); }); - it('should create address', function(done) { + it.only('should create address', function(done) { server.createAddress({}, function(err, address) { should.not.exist(err); address.should.exist; address.address.should.equal('3KxttbKQQPWmpsnXZ3rB4mgJTuLnVR7frg'); address.isChange.should.be.false; address.path.should.equal('m/2147483647/0/0'); - done(); + server.getNotifications({}, function(err, notifications) { + should.not.exist(err); + var notif = _.find(notifications, { + type: 'NewAddress' + }); + should.exist(notif); + notif.length.should.equal(1); + notif[0].data.address.should.equal('3KxttbKQQPWmpsnXZ3rB4mgJTuLnVR7frg'); + done(); + }); }); });