Files
xk-hy-transit-go/internal/db/query_test.go
2026-05-22 09:17:39 +08:00

20 lines
389 B
Go

package db
import "testing"
func TestMethodForStep(t *testing.T) {
m, err := MethodForStep("recipe")
if err != nil || m != "uploadRecipeIndicators" {
t.Fatalf("got %s %v", m, err)
}
if _, err := MethodForStep("nope"); err == nil {
t.Fatal("expected error")
}
}
func TestStepForMethod(t *testing.T) {
if StepForMethod("uploadConsultIndicators") != "consult" {
t.Fatal()
}
}