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>
25 lines
662 B
PHP
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();
|
|
});
|