Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot test an error being return in LastResultId #5

Closed
tapocol opened this issue Jun 23, 2014 · 0 comments
Closed

Cannot test an error being return in LastResultId #5

tapocol opened this issue Jun 23, 2014 · 0 comments

Comments

@tapocol
Copy link
Contributor

tapocol commented Jun 23, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant