Better test name.

This commit is contained in:
Vladimir Mihailenco 2014-07-13 15:22:52 +03:00
parent 97039c229c
commit 2651b57a91
1 changed files with 4 additions and 3 deletions

View File

@ -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, "")
} }