testutils
mockBuilder: func(t *testing.T) *sql.DB {
db, mock := testutils.NewSQLMock()
mock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `invoices` WHERE uid = ? AND `invoices`.`deleted_at` IS NULL")).
WithArgs(testutils.IdInNum).
WillReturnRows(testutils.StructsToRows([]any{
model.Invoice{
ID: invoiceID1,
UID: int32(testutils.IdInNum),
Status: "Paid",
},
最后更新于