tiki/controller/testing.go
booleanmaybe 9fea091e34 remove hardcoded board
remove unused status
add kanban plugin
remove id from frontmatter
2026-01-24 23:21:20 -05:00

38 lines
995 B
Go

package controller
import (
"github.com/boolean-maybe/tiki/task"
)
// Test utilities for controller unit tests
// newMockNavigationController creates a new mock navigation controller
func newMockNavigationController() *NavigationController {
// Create a real NavigationController but we won't use most of its methods in tests
// The key is that TaskController only calls SuspendAndEdit which we can ignore in tests
return &NavigationController{
// minimal initialization - only used to satisfy type checking
app: nil, // Unit tests don't need the tview.Application
}
}
// Test fixtures
// newTestTask creates a test task with default values
func newTestTask() *task.Task {
return &task.Task{
ID: "TIKI-1",
Title: "Test Task",
Status: task.StatusReady,
Type: task.TypeStory,
Priority: 3,
Points: 5,
}
}
// newTestTaskWithID creates a test task with ID "DRAFT-1"
func newTestTaskWithID() *task.Task {
t := newTestTask()
t.ID = "DRAFT-1"
return t
}