mirror of
https://github.com/DATA-DOG/go-sqlmock.git
synced 2025-01-07 23:01:44 +02:00
Fixing incorrect []byte handling in expectation.
Fixes the incorrect handling of []byte when comparing an argument recieved from Exec or Query and the exepected value. Closes #35
This commit is contained in:
parent
b54b0cd4c8
commit
19a0529399
@ -3,6 +3,7 @@ package sqlmock
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -349,7 +350,7 @@ func (e *queryBasedExpectation) argsMatches(args []driver.Value) error {
|
||||
return fmt.Errorf("argument %d: non-subset type %T returned from Value", k, darg)
|
||||
}
|
||||
|
||||
if darg != args[k] {
|
||||
if !reflect.DeepEqual(darg, args[k]) {
|
||||
return fmt.Errorf("argument %d expected [%T - %+v] does not match actual [%T - %+v]", k, darg, darg, args[k], args[k])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user