-
-
Notifications
You must be signed in to change notification settings - Fork 405
Closed
Description
The latest release changes the way arguments are matched which is causing a breaking behavior compared to previous versions.
See #295.
Operating system and Go Version
Ubuntu 22.04 and Go v1.21.1
Issue
Arguments must now always be provided otherwise it does not match anymore.
Reproduction steps
func TestExample(t *testing.T) {
db, mockDB, err := sqlmock.New()
require.NoError(t, err)
mockDB.ExpectExec(`UPDATE "foo" SET "bar" .*`).WillReturnResult(sqlmock.NewResult(0, 1))
_, err = db.Exec(`UPDATE "foo" SET "bar" = $1`, 42)
require.NoError(t, err)
}Expected Result
Instead of introducing a breaking change, the behavior should be enabled explicitly by the developer. Here an error is returned.
Actual Result
It should not return an error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels