create(['balance_rub' => '1000.00']); Project::factory()->for($tenant)->create(['is_active' => true, 'daily_limit_target' => 10]); Project::factory()->for($tenant)->create(['is_active' => true, 'daily_limit_target' => 15]); Project::factory()->for($tenant)->create(['is_active' => false, 'daily_limit_target' => 100]); // не считается expect($tenant->requiredLeadsForTomorrow())->toBe(25); }); it('casts frozen_by_balance_at to datetime', function () { $tenant = Tenant::factory()->create(['frozen_by_balance_at' => now()]); expect($tenant->frozen_by_balance_at)->toBeInstanceOf(Carbon::class); }); it('casts project preflight_blocked_at to datetime', function () { $project = Project::factory()->create(['preflight_blocked_at' => now()]); expect($project->preflight_blocked_at)->toBeInstanceOf(Carbon::class); });