Closed Kowiste closed 1 month ago
Hi @Kowiste! It appears you are not using database/sql
directly, could you clarify what database wrapper library and version are you using? By what you are showing, it appears that your wrapper library is calling Query
or QueryRow
instead of Exec
as you were expecting in your test, so I would suggest you start by using mockDB.ExpectQuery
instead of mockDB.ExpectExec
.
Closing as this is not an issue in sqlmock
, but feel free to keep commenting if it's not solved and we may be able to help you with your code.
I have to test one function where there is a call to a procedure like this
in the test i'm trying this
and I have this error
There is not any other previous call to a database