Files
jx-callback/business/model/dao/food_recipe_test.go
2019-11-29 10:35:38 +08:00

41 lines
724 B
Go

package dao
import (
"testing"
)
func TestQueryRecipes(t *testing.T) {
db := GetDB()
recipeList, _, err := QueryFoodRecipes(db, "", 0, "", "", nil, 0, 0)
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")
}
}