You've already forked go-sqlmock
mirror of
https://github.com/DATA-DOG/go-sqlmock.git
synced 2025-06-23 00:17:47 +02:00
make arg expectations optional
sometimes it's impossible to anticipate the args (such as in an insert), sometimes args don't need to be checked
This commit is contained in:
@ -40,6 +40,9 @@ func (e *queryBasedExpectation) queryMatches(sql string) bool {
|
||||
}
|
||||
|
||||
func (e *queryBasedExpectation) argsMatches(args []driver.Value) bool {
|
||||
if nil == e.args {
|
||||
return true
|
||||
}
|
||||
if len(args) != len(e.args) {
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user