go-mocket icon indicating copy to clipboard operation
go-mocket copied to clipboard

Examples for mocking database transactions using go-mocket

Open humblefool007 opened this issue 5 years ago • 1 comments

Hi, I am using gorm as ORM in my golang project. I was initially using sqlmock for unit testing now I have switched to go-mocket since it is recommended by the gorm-community and I faced issues while mocking postgres INSERT queries. But now the problem is that I am unable to mock my db transactions. Can someone guide me with this

humblefool007 avatar Apr 15 '19 14:04 humblefool007

Is it even possible with available mock functions?

update: mocket is not catching the transaction commit

pavansokkenagaraj avatar Jun 10 '19 15:06 pavansokkenagaraj