20 lines
389 B
Go
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()
|
|
}
|
|
}
|