You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the statement prepared by go-mocket and the one prepared by GORM were not the exact same:
`MOCK_FAKE_DRIVER` is not officially supported, running under compatibility mode.
2020/01/30 22:30:01 mock_catcher: check query: SELECT * FROM "documentos" WHERE "documentos"."deleted_at" IS NULL AND ((clave = 50602121900026335208700100001010000000000181580890)) ORDER BY "documentos"."id" ASC LIMIT 1
(/home/jorge/code/kue/fero/dev/backend/utils.go:450)
[2020-01-30 22:30:01] [1.00ms] SELECT * FROM "documentos" WHERE "documentos"."deleted_at" IS NULL AND ((clave = '50602121900026335208700100001010000000000181580890')) ORDER BY "documentos"."id" ASC LIMIT 1
[0 rows affected or returned ]
notice that the long string of numbers has single quotes and the statement prepared by GORM has them. In #2 someone pointed out what was the issue (this line https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L114 ). I'm aware of the challenge with getting a different query from GORM than the one go-mocket prepares, I would advise on providing users with a diff of sorts to warn them about the differences because small things like single quotes vs no quotes made me spent several hours figuring out what I was doing wrong.
The text was updated successfully, but these errors were encountered:
Improves user experience explicitly showing the user what is the difference between the query and
the match string set in order to aid with test debugging. This commit should fix bug Selvatico#21
I noticed that the statement prepared by go-mocket and the one prepared by GORM were not the exact same:
notice that the long string of numbers has single quotes and the statement prepared by GORM has them. In #2 someone pointed out what was the issue (this line https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L114 ). I'm aware of the challenge with getting a different query from GORM than the one go-mocket prepares, I would advise on providing users with a diff of sorts to warn them about the differences because small things like single quotes vs no quotes made me spent several hours figuring out what I was doing wrong.
The text was updated successfully, but these errors were encountered: