mirror of
https://github.com/zhashkevych/go-sqlxmock.git
synced 2024-11-24 08:12:13 +02:00
423 B
423 B
db = mock.Open("test", "")
db.ExpectTransactionBegin() db.ExpectTransactionBegin().WillReturnError("some error") db.ExpectQuery("SELECT bla").With(5, 8, "stat").WillReturnNone() db.ExpectExec("UPDATE tbl SET").With(5, "val").WillReturnResult(res /* sql.Result /) db.ExpectExec("INSERT INTO bla").With(5, 8, "stat").WillReturnResult(res / sql.Result */) db.ExpectQuery("SELECT bla").With(5, 8, "stat").WillReturnRows()