test(admin-dashboard): paid pending workbench link locks sync_status=unsynced
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminDashboardBillingWorkbenchPaidPendingShouldUseSyncStatusUnsyncedInLinkTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
protected function loginAsPlatformAdmin(): void
|
||||||
|
{
|
||||||
|
$this->seed();
|
||||||
|
|
||||||
|
$this->post('/admin/login', [
|
||||||
|
'email' => 'platform.admin@demo.local',
|
||||||
|
'password' => 'Platform@123456',
|
||||||
|
])->assertRedirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_dashboard_billing_workbench_paid_pending_should_use_sync_status_unsynced_in_link(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
// 护栏:收费工作台「待生效」应显式锁定 sync_status=unsynced(排除同步失败等异常单)
|
||||||
|
$res->assertSee('待生效', false);
|
||||||
|
$res->assertSee('payment_status=paid', false);
|
||||||
|
$res->assertSee('status=pending', false);
|
||||||
|
$res->assertSee('sync_status=unsynced', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user