testutil

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTestWorkflow

func DefaultTestWorkflow() json.RawMessage

DefaultTestWorkflow returns a minimal valid workflow JSON for testing.

func NewTestService

func NewTestService(t *testing.T) taskflow.TaskFlow

NewTestService creates a fresh in-memory SQLite store and service for testing. Enables development mode (allows private webhook URLs). Returns the taskflow.TaskFlow interface, not the concrete type.

func NewTestServiceWithBus

func NewTestServiceWithBus(t *testing.T) (taskflow.TaskFlow, repo.Store, *eventbus.EventBus)

NewTestServiceWithBus creates a service with an event bus and returns the service, store, and bus for integration testing.

func SeedActor

func SeedActor(t *testing.T, svc taskflow.TaskFlow, name string, role model.Role) model.Actor

SeedActor creates a test actor with sensible defaults.

func SeedBoard

func SeedBoard(t *testing.T, svc taskflow.TaskFlow, slug string) model.Board

SeedBoard creates a test board with the default test workflow.

func SeedTask

func SeedTask(t *testing.T, svc taskflow.TaskFlow, boardSlug, title, createdBy string) model.Task

SeedTask creates a test task on the given board.

Types

This section is empty.

Jump to

Keyboard shortcuts

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