You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Query is created dynamically in the code. Sometimes it will expect an arg and sometimes it won't.
I expected that the mock would raise an error if the expectation is no query args but actually one is supplied.
Issue
Query is created dynamically in the code. Sometimes it will expect an arg and sometimes it won't.
I expected that the mock would raise an error if the expectation is no query args but actually one is supplied.
Reproduction steps
https://go.dev/play/p/VwF9k6KlET2
Expected Result
Unexpected error ... arguments do not match: expected 0, but got 1 arguments
Actual Result
No error, expectations are met
Locally I have fixed this by removing:
go-sqlmock/expectations_go18.go
Lines 32 to 34 in fd316ea
I expected that the mock should catch if an unexpected argument is passed. Be it on the mock or on the actual query in the productive code.
The text was updated successfully, but these errors were encountered: