test fixed

This commit is contained in:
Gabriel Bazán 2016-01-15 12:37:11 -03:00
parent c71f6c637f
commit 88d292aace
1 changed files with 20 additions and 1 deletions

View File

@ -5484,18 +5484,37 @@ describe('Wallet service', function() {
request.yields();
helpers.getAuthServer(wallet.copayers[0].id, function(server) {
should.exist(server);
server.pushNotificationsUnsubscribe({}, function(err, response) {
server.pushNotificationsUnsubscribe(null, function(err, response) {
should.not.exist(err);
var calls = request.getCalls();
calls.length.should.equal(1);
var args = _.map(calls, function(c) {
return c.args[0];
});
args[0].body.user.should.contain(wallet.copayers[0].id);
done();
});
});
});
it('should unsubscribe all wallets from device to push notifications service', function(done) {
request.yields();
helpers.getAuthServer(wallet.copayers[0].id, function(server) {
should.exist(server);
server.pushNotificationsUnsubscribe('TOKEN_DEVICE', function(err, response) {
should.not.exist(err);
var calls = request.getCalls();
calls.length.should.equal(1);
var args = _.map(calls, function(c) {
return c.args[0];
});
args[0].body.token.should.contain('TOKEN_DEVICE');
done();
});
});
});
});
});