1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Rename .command_used to .command and add the used command to more errors

This commit is contained in:
Ruben Bridgewater
2015-09-20 18:56:21 +02:00
parent 1f121fa6e2
commit c60a3b65fe
5 changed files with 40 additions and 29 deletions

View File

@ -41,7 +41,7 @@ describe("client authentication", function () {
client = redis.createClient.apply(redis.createClient, args);
client.once('error', function (err) {
assert.strictEqual(err.command_used, 'AUTH');
assert.strictEqual(err.command, 'AUTH');
assert.ok(/ERR invalid password/.test(err.message));
return done();
});
@ -55,7 +55,7 @@ describe("client authentication", function () {
client = redis.createClient.apply(redis.createClient, args);
client.auth('', function (err, res) {
assert.strictEqual(err.command_used, 'AUTH');
assert.strictEqual(err.command, 'AUTH');
assert.ok(/ERR invalid password/.test(err.message));
done();
});
@ -130,7 +130,7 @@ describe("client authentication", function () {
client = redis.createClient.apply(redis.createClient, args);
client.auth(undefined, function(err, res) {
assert.strictEqual(err.message, 'The password has to be of type "string"');
assert.strictEqual(err.command_used, 'AUTH');
assert.strictEqual(err.command, 'AUTH');
assert.strictEqual(res, undefined);
done();
});
@ -142,7 +142,7 @@ describe("client authentication", function () {
client = redis.createClient.apply(redis.createClient, args);
client.on('error', function (err) {
assert.strictEqual(err.message, 'The password has to be of type "string"');
assert.strictEqual(err.command_used, 'AUTH');
assert.strictEqual(err.command, 'AUTH');
done();
});
client.auth(234567);