From 66663c57e0d31f300dfd3aa7241b2a25403a9d11 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:14:06 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=AA=20Add=20test=20for=20WithTx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/server/internal/db/sqlc/db_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 apps/server/internal/db/sqlc/db_test.go diff --git a/apps/server/internal/db/sqlc/db_test.go b/apps/server/internal/db/sqlc/db_test.go new file mode 100644 index 0000000..939c714 --- /dev/null +++ b/apps/server/internal/db/sqlc/db_test.go @@ -0,0 +1,22 @@ +package db + +import ( + "testing" + + "github.com/jackc/pgx/v5" + "github.com/stretchr/testify/assert" +) + +type mockTx struct { + pgx.Tx +} + +func TestWithTx(t *testing.T) { + q := &Queries{} + tx := &mockTx{} + + qWithTx := q.WithTx(tx) + + assert.NotNil(t, qWithTx) + assert.Equal(t, tx, qWithTx.db) +} From ba608cc35202b08a66251bd3aeab32e76b58dbaa Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:31:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=AA=20Add=20test=20for=20WithTx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit