// Code generated by BobGen sqlite v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package factory

import (
	"context"
	"testing"
)

func TestCreateRecord(t *testing.T) {
	if testDB == nil {
		t.Skip("skipping test, no DSN provided")
	}

	ctx, cancel := context.WithCancel(t.Context())
	t.Cleanup(cancel)

	tx, err := testDB.Begin(ctx)
	if err != nil {
		t.Fatalf("Error starting transaction: %v", err)
	}

	defer func() {
		if err := tx.Rollback(ctx); err != nil {
			t.Fatalf("Error rolling back transaction: %v", err)
		}
	}()

	if _, err := New().NewRecordWithContext(ctx).Create(ctx, tx); err != nil {
		t.Fatalf("Error creating Record: %v", err)
	}
}
