I am writing test cases for a GoLang application and i am using sqlmock for mocking the SQL queries but i am getting following error while executing go test
Params: [ call to query , was not expected, next expectation is: ExpectedBegin => expecting database transaction Begin]
Any idea on this?
The error message means some SQL query was called which was not mocked.
sqlmock expected a begin, but instead got something else. Show the function and test here for more info.