- GetOrderActDetail and sku_benefit_detail
This commit is contained in:
@@ -95,32 +95,32 @@ func TestQueryKeyWordDicInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSyncProduct(t *testing.T) {
|
||||
result, err := api.SyncProduct("11732425", "2015717812")
|
||||
result, err := api.SyncProduct(mustExistStoreID, "2022250244")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
baseapi.SugarLogger.Debug(result)
|
||||
result, err = api.SyncProduct("wrongstoreid", "2015717812")
|
||||
result, err = api.SyncProduct("wrongstoreid", "2022250244")
|
||||
if err == nil {
|
||||
t.Fatal("SyncProduct should return error")
|
||||
}
|
||||
result, err = api.SyncProduct("11732425", "wrongskuid")
|
||||
result, err = api.SyncProduct(mustExistStoreID, "wrongskuid")
|
||||
if err == nil {
|
||||
t.Fatal("SyncProduct should return error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetProductStatust(t *testing.T) {
|
||||
result, err := api.GetProductStatus("11732425", "2015717812")
|
||||
result, err := api.GetProductStatus(mustExistStoreID, "2022250244")
|
||||
if err != nil || result == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// baseapi.SugarLogger.Debug(result)
|
||||
result, err = api.GetProductStatus("wrongstoreid", "2015717812")
|
||||
result, err = api.GetProductStatus("wrongstoreid", "2022250244")
|
||||
if err == nil {
|
||||
t.Fatal("GetProductStatus should return error")
|
||||
}
|
||||
result, err = api.GetProductStatus("11732425", "wrongskuid")
|
||||
result, err = api.GetProductStatus(mustExistStoreID, "wrongskuid")
|
||||
if err == nil {
|
||||
t.Fatal("GetProductStatus should return error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user