1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2024-11-21 17:17:08 +02:00

fix package

This commit is contained in:
bearname 2022-02-07 15:03:11 +03:00 committed by GitHub
parent 699dcdfa20
commit 742d0bc5c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ func (a AnyTime) Match(v driver.Value) bool {
func TestAnyTimeArgument(t *testing.T) {
t.Parallel()
db, mock, err := New()
db, mock, err := sqlmock.New()
if err != nil {
t.Errorf("an error '%s' was not expected when opening a stub database connection", err)
}
@ -201,7 +201,7 @@ func TestAnyTimeArgument(t *testing.T) {
mock.ExpectExec("INSERT INTO users").
WithArgs("john", AnyTime{}).
WillReturnResult(NewResult(1, 1))
WillReturnResult(sqlmock.NewResult(1, 1))
_, err = db.Exec("INSERT INTO users(name, created_at) VALUES (?, ?)", "john", time.Now())
if err != nil {