diff --git a/testing.go b/testing.go new file mode 100644 index 0000000..355111c --- /dev/null +++ b/testing.go @@ -0,0 +1,15 @@ +package qg + +import "github.com/jackc/pgx/v5/pgxpool" + +// // TestInjectJobConn injects *pgxpool.Conn to Job +func TestInjectJobConn(j *Job, conn *pgxpool.Conn) *Job { + j.conn = conn + return j +} + +// TestInjectJobTx injects tx to Job +func TestInjectJobTx(j *Job, tx Txer) *Job { + j.tx = tx + return j +}