@@ -959,7 +959,7 @@ func TestPrepareExec(t *testing.T) {
959
959
mock .ExpectBegin ()
960
960
ep := mock .ExpectPrepare ("foo" , "INSERT INTO ORDERS\\ (ID, STATUS\\ ) VALUES \\ (\\ ?, \\ ?\\ )" )
961
961
for i := 0 ; i < 3 ; i ++ {
962
- ep .ExpectExec ().WillReturnResult (NewResult ("UPDATE" , 1 ))
962
+ ep .ExpectExec ().WithArgs ( AnyArg (), AnyArg ()). WillReturnResult (NewResult ("UPDATE" , 1 ))
963
963
}
964
964
mock .ExpectCommit ()
965
965
tx , _ := mock .Begin (context .Background ())
@@ -1071,7 +1071,7 @@ func TestPreparedStatementCloseExpectation(t *testing.T) {
1071
1071
defer mock .Close (context .Background ())
1072
1072
1073
1073
ep := mock .ExpectPrepare ("foo" , "INSERT INTO ORDERS" ).WillBeClosed ()
1074
- ep .ExpectExec ().WillReturnResult (NewResult ("UPDATE" , 1 ))
1074
+ ep .ExpectExec ().WithArgs ( AnyArg (), AnyArg ()). WillReturnResult (NewResult ("UPDATE" , 1 ))
1075
1075
1076
1076
_ , err = mock .Prepare (context .Background (), "foo" , "INSERT INTO ORDERS(ID, STATUS) VALUES (?, ?)" )
1077
1077
if err != nil {
@@ -1101,7 +1101,7 @@ func TestExecExpectationErrorDelay(t *testing.T) {
1101
1101
1102
1102
// test that return of error is delayed
1103
1103
delay := time .Millisecond * 100
1104
- mock .ExpectExec ("^INSERT INTO articles" ).
1104
+ mock .ExpectExec ("^INSERT INTO articles" ).WithArgs ( AnyArg ()).
1105
1105
WillReturnError (errors .New ("slow fail" )).
1106
1106
WillDelayFor (delay )
1107
1107
0 commit comments