MCPcopy Create free account
hub / github.com/Facets-cloud/flow / insertTask

Function insertTask

internal/flowdb/db_test.go:31–39  ·  view source on GitHub ↗
(t *testing.T, db *sql.DB, slug, name, status, priority, wd string, project any)

Source from the content-addressed store, hash-verified

29}
30
31func insertTask(t *testing.T, db *sql.DB, slug, name, status, priority, wd string, project any) {
32 t.Helper()
33 now := NowISO()
34 _, err := db.Exec(`INSERT INTO tasks (slug, name, project_slug, status, priority, work_dir, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
35 slug, name, project, status, priority, wd, now, now)
36 if err != nil {
37 t.Fatalf("insert task: %v", err)
38 }
39}
40
41func TestOpenDBCreatesSchema(t *testing.T) {
42 db := openTempDB(t)

Callers 1

TestTaskCRUDFunction · 0.70

Calls 1

NowISOFunction · 0.85

Tested by

no test coverage detected