feat(admin): 仪表盘补齐订阅到期治理入口(7天内到期/已过期)

This commit is contained in:
萝卜
2026-03-15 19:34:32 +08:00
parent b7471026ef
commit dc7b7b395c
3 changed files with 53 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardSubscriptionExpiryQuickLinksShouldRenderTest 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_subscription_expiry_quick_links_should_render(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('订阅到期治理');
$res->assertSee('href="/admin/site-subscriptions?expiry=expiring_7d&back=%2Fadmin"', false);
$res->assertSee('href="/admin/site-subscriptions?expiry=expired&back=%2Fadmin"', false);
$res->assertDontSee('&amp;back=', false);
}
}