Fix quotes

This commit is contained in:
Jamie Curnow
2024-09-11 19:38:41 +10:00
parent e78dd069f1
commit c4db4a2647
4 changed files with 12 additions and 11 deletions

View File

@ -122,12 +122,12 @@ func (s *testsuite) TestList() {
defer goleak.VerifyNone(s.T(), goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
s.mock.
ExpectQuery(regexp.QuoteMeta("SELECT count(*) FROM \"certificate_authority\" WHERE `certificate_authority`.`name` LIKE $1 AND \"certificate_authority\".\"is_deleted\" = $2")).
ExpectQuery(regexp.QuoteMeta(`SELECT count(*) FROM "certificate_authority" WHERE "certificate_authority"."name" LIKE $1 AND "certificate_authority"."is_deleted" = $2`)).
WithArgs("%test%", 0).
WillReturnRows(s.listCountRows)
s.mock.
ExpectQuery(regexp.QuoteMeta("SELECT * FROM \"certificate_authority\" WHERE `certificate_authority`.`name` LIKE $1 AND \"certificate_authority\".\"is_deleted\" = $2 ORDER BY name asc LIMIT $3")).
ExpectQuery(regexp.QuoteMeta(`SELECT * FROM "certificate_authority" WHERE "certificate_authority"."name" LIKE $1 AND "certificate_authority"."is_deleted" = $2 ORDER BY name asc LIMIT $3`)).
WithArgs("%test%", 0, 8).
WillReturnRows(s.listRows)