Browse Source

Add regression test

greenkeeper-update-all
Ruben Bridgewater 9 years ago
parent
commit
ebea0872a9
  1. 16
      test/commands/multi.spec.js

16
test/commands/multi.spec.js

@ -537,6 +537,22 @@ describe("The 'multi' method", function () {
});
});
it("works properly after a reconnect. issue #897", function (done) {
helper.serverVersionAtLeast.call(this, client, [2, 6, 5]);
client.stream.destroy();
client.on('error', function (err) {
assert.strictEqual(err.code, 'ECONNREFUSED');
});
client.on('ready', function () {
client.multi([['set', 'foo', 'bar'], ['get', 'foo']]).exec(function (err, res) {
assert(!err);
assert.strictEqual(res[1], 'bar');
done();
});
});
});
});
});
});

Loading…
Cancel
Save