mirror of
https://github.com/redis/go-redis.git
synced 2025-06-14 01:21:30 +03:00
Allow setting and scaning interface{} values.
This commit is contained in:
@ -26,7 +26,7 @@ var _ = Describe("Command", func() {
|
||||
Expect(client.Close()).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
It("should have a plain string result", func() {
|
||||
It("should implement Stringer", func() {
|
||||
set := client.Set("foo", "bar", 0)
|
||||
Expect(set.String()).To(Equal("SET foo bar: OK"))
|
||||
|
||||
@ -117,6 +117,13 @@ var _ = Describe("Command", func() {
|
||||
Expect(f).To(Equal(float64(10)))
|
||||
})
|
||||
|
||||
It("Cmd should return string", func() {
|
||||
cmd := redis.NewCmd("PING")
|
||||
client.Process(cmd)
|
||||
Expect(cmd.Err()).NotTo(HaveOccurred())
|
||||
Expect(cmd.Val()).To(Equal("PONG"))
|
||||
})
|
||||
|
||||
Describe("races", func() {
|
||||
var C, N = 10, 1000
|
||||
if testing.Short() {
|
||||
|
Reference in New Issue
Block a user