Closed willis7 closed 5 years ago
Hi, in go errors need to be checked, read the examples and look at the test files, in this case NamedExec fails with an error because the sql.Result is not mocked and you do not check errors. read examples to understand the library you are using before asking any questions
I removed the errors for brevity. I have also read the examples and they are all too simple to be helpful here. There are no examples with sqlx, which is to be expected, and so questioning here seems like the most obvious course of action.
This was a lack of understanding on my part. Closing
This could be a fundamental misunderstanding of the framework, or a real bug.
Code under test
Test
I would expect
mock.ExpectExec("garbage")
to fail, but it passes every time.