You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Add test for GET non-existent-key
case. (issue #267)
This commit is contained in:
11
test.js
11
test.js
@@ -817,12 +817,19 @@ tests.DBSIZE = function () {
|
|||||||
client.DBSIZE([], last(name, require_number_pos("DBSIZE")));
|
client.DBSIZE([], last(name, require_number_pos("DBSIZE")));
|
||||||
};
|
};
|
||||||
|
|
||||||
tests.GET = function () {
|
tests.GET_1 = function () {
|
||||||
var name = "GET";
|
var name = "GET_1";
|
||||||
client.set(["get key", "get val"], require_string("OK", name));
|
client.set(["get key", "get val"], require_string("OK", name));
|
||||||
client.GET(["get key"], last(name, require_string("get val", name)));
|
client.GET(["get key"], last(name, require_string("get val", name)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tests.GET_2 = function() {
|
||||||
|
var name = "GET_2";
|
||||||
|
|
||||||
|
// tests handling of non-existent keys
|
||||||
|
client.GET('this_key_shouldnt_exist', last(name, require_null(name)));
|
||||||
|
};
|
||||||
|
|
||||||
tests.SET = function () {
|
tests.SET = function () {
|
||||||
var name = "SET";
|
var name = "SET";
|
||||||
client.SET(["set key", "set val"], require_string("OK", name));
|
client.SET(["set key", "set val"], require_string("OK", name));
|
||||||
|
Reference in New Issue
Block a user