trypost/tests/Feature/Auth/SignupRequiresCheckoutTest.php
Paulo Castellano a8f999f45f chore(billing): surface trial copy and rename signup test
Show the checkout-based trial duration again on the subscribe page and rename the signup billing test file so it matches the current no-trial-at-signup behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 09:57:46 -03:00

25 lines
662 B
PHP

<?php
declare(strict_types=1);
use App\Actions\User\CreateUser;
use Database\Seeders\PlanSeeder;
beforeEach(function () {
config(['trypost.self_hosted' => false]);
$this->seed(PlanSeeder::class);
});
test('new signup does not create a trial before checkout', function () {
$user = CreateUser::execute([
'name' => 'Alice',
'email' => 'alice@example.com',
'password' => 'password123',
'timezone' => 'UTC',
'registration_ip' => '127.0.0.1',
]);
expect($user->account->plan_id)->toBeNull();
expect($user->account->trial_ends_at)->toBeNull();
expect($user->account->stripe_id)->toBeNull();
});