40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminDashboardBillingWorkbenchLinksTest 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_should_render_billing_workbench_links(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin');
|
|
$res->assertOk();
|
|
|
|
$res->assertSee('收费工作台');
|
|
$res->assertSee('href="/admin/platform-orders"', false);
|
|
$res->assertSee('进入平台订单');
|
|
|
|
$res->assertSee('href="/admin/site-subscriptions"', false);
|
|
$res->assertSee('进入订阅管理');
|
|
|
|
$res->assertSee('href="/admin/plans"', false);
|
|
$res->assertSee('进入套餐管理');
|
|
}
|
|
}
|