DATA-DOG/go-sqlmock

Cannot test an error being return in LastResultId

tapocol opened this issue · 0 comments

LastInsertId always passes back the int64 in the mocked result. Can't quite get to 100% code coverage without forcing a LastInsertId error.

func (r *result) LastInsertId() (int64, error) {
    return r.insertID, nil
}

https://github.com/DATA-DOG/go-sqlmock/blob/master/result.go#L25