Files
jx-callback/business/model/dao/food_recipe_test.go
2019-09-17 14:39:15 +08:00

41 lines
711 B
Go

package dao
import (
"testing"
)
func TestQueryRecipes(t *testing.T) {
db := GetDB()
recipeList, err := QueryFoodRecipes(db, "", -1, "", "")
if err != nil {
t.Fatal(err)
}
if len(recipeList) > 0 {
t.Fatal("should not return list")
}
recipeItemList, err := QueryFoodRecipesItems(db, -1)
if err != nil {
t.Fatal(err)
}
if len(recipeItemList) > 0 {
t.Fatal("should not return list")
}
choiceList, err := QueryFoodRecipesItemChoices(db, -1)
if err != nil {
t.Fatal(err)
}
if len(choiceList) > 0 {
t.Fatal("should not return list")
}
stepList, err := QueryFoodRecipesSteps(db, -1)
if err != nil {
t.Fatal(err)
}
if len(stepList) > 0 {
t.Fatal("should not return list")
}
}