1
0
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:
John Robinson
2014-02-27 13:53:46 -08:00
parent 5aa5d01fb9
commit 52242da115
2 changed files with 9 additions and 2 deletions

View File

@ -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
}