testutils

package
v1.0.0-beta.229 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnv

type TestEnv struct {
	Logger  *slog.Logger
	Service taxcode.Service
	Adapter taxcode.Repository
	Client  *entdb.Client
	// contains filtered or unexported fields
}

func NewTestEnv

func NewTestEnv(t *testing.T) *TestEnv

func (*TestEnv) Close

func (e *TestEnv) Close(t *testing.T)

func (*TestEnv) CreateTaxCode

func (e *TestEnv) CreateTaxCode(ctx context.Context, t *testing.T, namespace string, opts ...taxcode.CreateTaxCodeInput) taxcode.TaxCode

CreateTaxCode creates a tax code; if opts is provided its first element overrides the input — Namespace, Key, and Name are generated when empty.

func (*TestEnv) DBSchemaMigrate

func (e *TestEnv) DBSchemaMigrate(t *testing.T)

func (*TestEnv) SetupNamespaceDefaults

func (e *TestEnv) SetupNamespaceDefaults(ctx context.Context, t *testing.T, namespace string)

SetupNamespaceDefaults provisions two seed tax codes and upserts the org-default tax codes for namespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL