When I run test with go-sqlmock, I have errors listed below
[2018-05-03 13:45:28] call to Query 'INSERT INTO "holds" ("created_at","updated_at","deleted_at","operation_id","sum","status") VALUES ($1,$2,$3,$4,$5,$6) RETURNING "holds"."id"' with args [{Name: Ordinal:1 Value:2018-05-03 13:45:28.146858982 +0500 +05 m=+0.002507374} {Name: Ordinal:2 Value:2018-05-03 13:45:28.146858982 +0500 +05 m=+0.002507374} {Name: Ordinal:3 Value:<nil>} {Name: Ordinal:4 Value:1} {Name: Ordinal:5 Value:1000} {Name: Ordinal:6 Value:PENDING}], was not expected, next expectation is: ExpectedExec => expecting Exec or ExecContext which:
- matches sql: 'INSERT INTO "holds"'
- is with arguments:
0 - {}
1 - {}
2 - <nil>
3 - 1
4 - 1000
5 - PENDING
- should return Result having:
LastInsertId: 1
RowsAffected: 0
FAIL
Aucun commentaire:
Enregistrer un commentaire