diff --git a/tests/Feature/AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest.php b/tests/Feature/AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest.php index 52fbf61..9857e78 100644 --- a/tests/Feature/AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest.php +++ b/tests/Feature/AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest.php @@ -48,6 +48,25 @@ class AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest extends TestCa 'meta' => [], ]); + // 同步失败单:不应计入“可同步”统计 + PlatformOrder::query()->create([ + 'merchant_id' => $merchantId, + 'plan_id' => null, + 'site_subscription_id' => 1, + 'created_by_admin_id' => $platformAdminId ?: null, + 'order_no' => 'PO_DASHBOARD_SYNCABLE_BUT_FAILED_002', + 'order_type' => 'new_purchase', + 'status' => 'activated', + 'payment_status' => 'paid', + 'payable_amount' => 9, + 'paid_amount' => 9, + 'meta' => [ + 'subscription_activation_error' => [ + 'message' => 'sync failed', + ], + ], + ]); + Cache::flush(); $res = $this->get('/admin');