gorm-ut icon indicating copy to clipboard operation
gorm-ut copied to clipboard

gorm v1.9.10 failed

Open navono opened this issue 5 years ago • 4 comments

I use the latest version of gorm and run test, it shows:

call to database transaction Begin, was not expected, next expectation is: ExpectedQuery => expecting Query, QueryContext or QueryRow which:
  - matches sql: 'INSERT INTO "person" \("id","name"\) VALUES \(\$1,\$2\) RETURNING "person"\."id"'
  - is with arguments:
    0 - 9a9508c1-440a-46e4-9061-9f1817968e6c
    1 - test-name

navono avatar Oct 21 '19 07:10 navono

I have the same problems.

ischaojie avatar Jun 25 '20 02:06 ischaojie

Same problem here

andreleoni avatar Aug 08 '20 15:08 andreleoni

Same problem here

aditya37 avatar Sep 11 '20 08:09 aditya37

I use the latest version of gorm and run test, it shows:

call to database transaction Begin, was not expected, next expectation is: ExpectedQuery => expecting Query, QueryContext or QueryRow which:
  - matches sql: 'INSERT INTO "person" \("id","name"\) VALUES \(\$1,\$2\) RETURNING "person"\."id"'
  - is with arguments:
    0 - 9a9508c1-440a-46e4-9061-9f1817968e6c
    1 - test-name

use s.mock.ExpectBegin() and s.mock.ExpectCommit()

syedbilalahmad avatar Jan 22 '22 20:01 syedbilalahmad