You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Fix send_command always returning should_buffer boolean
Fix .auth, .select and .exec to return the should_buffer boolean
This commit is contained in:
@@ -24,10 +24,11 @@ describe("The 'select' method", function () {
|
||||
});
|
||||
|
||||
it("returns an error if redis is not connected", function (done) {
|
||||
client.select(1, function (err, res) {
|
||||
var buffering = client.select(1, function (err, res) {
|
||||
assert(err.message.match(/The connection has already been closed/));
|
||||
done();
|
||||
});
|
||||
assert(typeof buffering === 'boolean');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,7 +37,7 @@ describe("The 'select' method", function () {
|
||||
|
||||
beforeEach(function (done) {
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
client.once("connect", function () { done(); });
|
||||
client.once("ready", function () { done(); });
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
@@ -46,11 +47,12 @@ describe("The 'select' method", function () {
|
||||
it("changes the database and calls the callback", function (done) {
|
||||
// default value of null means database 0 will be used.
|
||||
assert.strictEqual(client.selected_db, null, "default db should be null");
|
||||
client.SELECT(1, function (err, res) {
|
||||
var buffering = client.SELECT(1, function (err, res) {
|
||||
helper.isNotError()(err, res);
|
||||
assert.strictEqual(client.selected_db, 1, "db should be 1 after select");
|
||||
done();
|
||||
});
|
||||
assert(typeof buffering === 'boolean');
|
||||
});
|
||||
|
||||
describe("and a callback is specified", function () {
|
||||
|
Reference in New Issue
Block a user