Skip to content

Commit 358245b

Browse files
ideasculptorSamuel Gendler
authored and
Samuel Gendler
committed
restore strongly typed slices to ExpectedIntSlice and ExpectedStringSlice
1 parent d933529 commit 358245b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mock.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -453,28 +453,28 @@ func (m *mock) ExpectDo(args ...interface{}) *ExpectedCmd {
453453

454454
func (m *mock) ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice {
455455
e := &ExpectedIntSlice{}
456-
e.cmd = redis.NewCmd(m.ctx, args...)
456+
e.cmd = redis.NewIntSliceCmd(m.ctx, args...)
457457
m.pushExpect(e)
458458
return e
459459
}
460460

461461
func (m *mock) ExpectIntDo(args ...interface{}) *ExpectedInt {
462462
e := &ExpectedInt{}
463-
e.cmd = redis.NewCmd(m.ctx, args...)
463+
e.cmd = redis.NewIntCmd(m.ctx, args...)
464464
m.pushExpect(e)
465465
return e
466466
}
467467

468468
func (m *mock) ExpectStringDo(args ...interface{}) *ExpectedString {
469469
e := &ExpectedString{}
470-
e.cmd = redis.NewCmd(m.ctx, args...)
470+
e.cmd = redis.NewStringCmd(m.ctx, args...)
471471
m.pushExpect(e)
472472
return e
473473
}
474474

475475
func (m *mock) ExpectStringSliceDo(args ...interface{}) *ExpectedStringSlice {
476476
e := &ExpectedStringSlice{}
477-
e.cmd = redis.NewCmd(m.ctx, args...)
477+
e.cmd = redis.NewStringSliceCmd(m.ctx, args...)
478478
m.pushExpect(e)
479479
return e
480480
}

0 commit comments

Comments
 (0)