- 在修改美团外卖门店营业时间由于配送时间限制出错后,尝试根据限制时间调整后修改
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestReadStore(t *testing.T) {
|
||||
store, err := new(PurchaseHandler).ReadStore(jxcontext.AdminCtx, "4351018")
|
||||
store, err := curPurchaseHandler.ReadStore(jxcontext.AdminCtx, "4351018")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -18,8 +18,21 @@ func TestReadStore(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateStore(t *testing.T) {
|
||||
err := new(PurchaseHandler).UpdateStore(nil, 100002, "test")
|
||||
err := curPurchaseHandler.UpdateStore(nil, 100002, "test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConstrainOpTimeList(t *testing.T) {
|
||||
timeList := constrainOpTimeList([]int16{830, 1800}, []int16{
|
||||
0,
|
||||
200,
|
||||
930,
|
||||
1700,
|
||||
})
|
||||
t.Log(utils.Format4Output(timeList, false))
|
||||
if timeList[0] != 930 || timeList[1] != 1700 {
|
||||
t.Fatal("constrainOpTimeList failed")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user