Skip to content

Commit 82bb72a

Browse files
committed
fix args in ExpectDo methods
1 parent a7b9609 commit 82bb72a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mock.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,28 +410,28 @@ func (m *mock) ExpectWatch(keys ...string) *ExpectedError {
410410

411411
func (m *mock) ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice {
412412
e := &ExpectedIntSlice{}
413-
e.cmd = redis.NewCmd(m.ctx, args)
413+
e.cmd = redis.NewCmd(m.ctx, args...)
414414
m.pushExpect(e)
415415
return e
416416
}
417417

418418
func (m *mock) ExpectIntDo(args ...interface{}) *ExpectedInt {
419419
e := &ExpectedInt{}
420-
e.cmd = redis.NewCmd(m.ctx, args)
420+
e.cmd = redis.NewCmd(m.ctx, args...)
421421
m.pushExpect(e)
422422
return e
423423
}
424424

425425
func (m *mock) ExpectStringDo(args ...interface{}) *ExpectedString {
426426
e := &ExpectedString{}
427-
e.cmd = redis.NewCmd(m.ctx, args)
427+
e.cmd = redis.NewCmd(m.ctx, args...)
428428
m.pushExpect(e)
429429
return e
430430
}
431431

432432
func (m *mock) ExpectStringSliceDo(args ...interface{}) *ExpectedStringSlice {
433433
e := &ExpectedStringSlice{}
434-
e.cmd = redis.NewCmd(m.ctx, args)
434+
e.cmd = redis.NewCmd(m.ctx, args...)
435435
m.pushExpect(e)
436436
return e
437437
}

0 commit comments

Comments
 (0)