- 在修改美团外卖门店营业时间由于配送时间限制出错后,尝试根据限制时间调整后修改

This commit is contained in:
gazebo
2019-08-02 13:10:48 +08:00
parent e2a620b305
commit c0b6ae7de7
2 changed files with 70 additions and 2 deletions

View File

@@ -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")
}
}