Skip to content

Commit

Permalink
Add GETDEL command integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
wszaranski authored and alicebob committed Jun 13, 2021
1 parent 8c22d3d commit 5b191fb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions integration/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ func TestStringGetSet(t *testing.T) {
})
}

func TestStringGetdel(t *testing.T) {
testRaw(t, func(c *client) {
c.Do("GETDEL", "missing")

c.Do("SET", "foo", "bar")
c.Do("GETDEL", "foo")
c.Do("EXISTS", "foo")

// Failure cases
c.Error("wrong number", "GETDEL")
c.Error("wrong number", "GETDEL", "foo", "bar")
// Wrong type
c.Do("HSET", "hash", "key", "value")
c.Error("wrong kind", "GETDEL", "hash")
})
}

func TestStringMget(t *testing.T) {
testRaw(t, func(c *client) {
c.Do("SET", "foo", "bar")
Expand Down

0 comments on commit 5b191fb

Please sign in to comment.