SiteSubscription index: renewal create links carry require_subscription flag

This commit is contained in:
萝卜
2026-03-15 02:29:28 +00:00
parent 41463407aa
commit 015d3bec25
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Arr;
use Tests\TestCase;
class AdminSiteSubscriptionIndexCreateRenewalOrderKeepsFiltersShouldCarryRequireSubscriptionFlagTest 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_create_renewal_order_keeps_filters_link_should_carry_require_subscription_flag(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/site-subscriptions?' . Arr::query([
'merchant_id' => 2,
'plan_id' => 3,
'status' => 'activated',
]));
$res->assertOk();
$res->assertSee('创建续费订单(带当前筛选)', false);
$res->assertSee('require_subscription=1', false);
}
}