feat(admin): 仪表盘收费工作台补齐续费缺订阅快捷入口
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminDashboardBillingWorkbenchShouldIncludeRenewalMissingSubscriptionQuickLinkTest 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_should_include_renewal_missing_subscription_quick_link(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin');
|
||||
$res->assertOk();
|
||||
|
||||
// 链接应携带 back 回到仪表盘,并且 & 不应被 escape
|
||||
$res->assertSee('href="/admin/platform-orders?renewal_missing_subscription=1&back=%2Fadmin"', false);
|
||||
$res->assertDontSee('&back=', false);
|
||||
|
||||
$res->assertSee('续费缺订阅', false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user