优化支付日志和配置删除提示
This commit is contained in:
@@ -121,6 +121,20 @@ func TestListUsesSuccessfulPaymentStats(t *testing.T) {
|
||||
BizType: "order_pay",
|
||||
Status: "closed",
|
||||
},
|
||||
{
|
||||
PaymentNo: "PAY-LEGACY",
|
||||
OrderID: 3,
|
||||
OrderNo: "ORD-LEGACY",
|
||||
UserID: 2,
|
||||
PaymentConfigID: 0,
|
||||
Provider: "lakala",
|
||||
MerchantID: "M1",
|
||||
ThirdOrderID: "PAY-LEGACY",
|
||||
PayWay: "WXZF",
|
||||
AmountCent: 10130,
|
||||
BizType: "order_pay",
|
||||
Status: "failed",
|
||||
},
|
||||
}
|
||||
if err := db.Create(&payments).Error; err != nil {
|
||||
t.Fatalf("create payments failed: %v", err)
|
||||
@@ -137,6 +151,9 @@ func TestListUsesSuccessfulPaymentStats(t *testing.T) {
|
||||
if items[0].TotalTransactions != 1 || items[0].TotalAmountCent != 10130 {
|
||||
t.Fatalf("success stats = %d/%d, want 1/10130", items[0].TotalTransactions, items[0].TotalAmountCent)
|
||||
}
|
||||
if items[0].ReferenceCount != 3 {
|
||||
t.Fatalf("reference_count = %d, want 3", items[0].ReferenceCount)
|
||||
}
|
||||
if items[0].LastUsedAt == nil {
|
||||
t.Fatal("last success pay time should not be nil")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user