-
-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Labels
Description
I am trying to test the execution of an UPDATE query. The output of the failed execution is:
there were unfulfilled expectations: there is a remaining expectation which was not matched: ExpectedExec => expecting Exec or ExecContext which:
- matches sql: 'UPDATE `issue`'
- is with arguments:
0 - 3
1 - Issue_1_updated
2 - Issue_1_updated
3 -
4 -
5 - 1
6 - true
7 - true
8 - <nil>
9 - {}
10 - <nil>
11 - 1
- should return Result having:
LastInsertId: 1
RowsAffected: 1
FAIL
I was able to understand what didn't match by playing with sqlmock.AnyArg(). Rather than having to do that it would be helpful to have an output that tells me what values where received as arguments as well, so I can quickly do a visual comparison of what was expected and what were the actual values used.
kontrollanten, yoshinorihisakawa, bwhaley, ticketsnfines, groovili and 9 more