mirror of https://github.com/go-redis/redis.git
Better test name.
This commit is contained in:
parent
97039c229c
commit
2651b57a91
|
@ -2579,14 +2579,15 @@ func (t *RedisTest) TestPipelineDiscardQueued(c *C) {
|
||||||
c.Assert(pipeline.Close(), IsNil)
|
c.Assert(pipeline.Close(), IsNil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *RedisTest) TestPipelineFunc(c *C) {
|
func (t *RedisTest) TestPipelined(c *C) {
|
||||||
var get *redis.StringCmd
|
var get *redis.StringCmd
|
||||||
cmds, err := t.client.Pipelined(func(c *redis.Pipeline) error {
|
cmds, err := t.client.Pipelined(func(pipe *redis.Pipeline) error {
|
||||||
get = c.Get("foo")
|
get = pipe.Get("foo")
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
c.Assert(err, Equals, redis.Nil)
|
c.Assert(err, Equals, redis.Nil)
|
||||||
c.Assert(cmds, HasLen, 1)
|
c.Assert(cmds, HasLen, 1)
|
||||||
|
c.Assert(cmds[0], Equals, get)
|
||||||
c.Assert(get.Err(), Equals, redis.Nil)
|
c.Assert(get.Err(), Equals, redis.Nil)
|
||||||
c.Assert(get.Val(), Equals, "")
|
c.Assert(get.Val(), Equals, "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue