test fixed
This commit is contained in:
parent
c71f6c637f
commit
88d292aace
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue