Skip to content

Commit

Permalink
Added testHVALS
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hammond committed Apr 2, 2010
1 parent 867acc3 commit f5df050
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,15 @@ function testHKEYS() {
});
}

function testHVALS() {
client.hset("foo", "bar", "baz", expectNumericReply(1, "testHVALS"));
client.hset("foo", "quux", "doo", expectNumericReply(1, "testHVALS"));
client.hvals("foo", function (err, reply) {
if (err) assert.fail(err, "testHVALS");
checkDeepEqual([ "baz", "doo" ], reply.sort(), "testHVALS");
});
}

function testHLEN() {
client.hlen("foo", expectNumericReply(0, "testHLEN"));
client.hset("foo", "bar", "baz", expectNumericReply(1, "testHLEN"));
Expand All @@ -1293,17 +1302,13 @@ function testHLEN() {
}

function testHSET() {
client.hset("foo", "bar", "baz", expectNumericReply(1, "testHGET"));
client.hset("foo", "bar", "baz", expectNumericReply(1, "testHSET"));
client.hget("foo", "bar", function (err, reply) {
if (err) assert.fail(err, "testHGET");
checkEqual("baz", reply, "testHGET");
if (err) assert.fail(err, "testHSET");
checkEqual("baz", reply, "testHSET");
});
}

function testHVALS() {
// TODO code me
}

function testPSUBSCRIBE() {
// TODO code me
}
Expand Down

0 comments on commit f5df050

Please sign in to comment.