test: Optimize tests performance

This commit is contained in:
Víctor Falcón 2026-01-17 19:20:23 +01:00
parent 25e6f57f25
commit 3a684114bb
6 changed files with 0 additions and 18 deletions

View File

@ -6,9 +6,6 @@ use App\Models\AccountBalance;
use App\Models\Bank;
use App\Models\Category;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
beforeEach(function () {
$this->user = User::factory()->onboarded()->create();

View File

@ -5,9 +5,6 @@ use App\Models\Category;
use App\Models\Label;
use App\Models\Transaction;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
beforeEach(function () {
$this->user = User::factory()->create([

View File

@ -5,9 +5,6 @@ use App\Models\Account;
use App\Models\Category;
use App\Models\Transaction;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
beforeEach(function () {
$this->user = User::factory()->create();

View File

@ -7,9 +7,6 @@ use App\Models\AccountBalance;
use App\Models\Category;
use App\Models\Transaction;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
beforeEach(function () {
$this->user = User::factory()->create();

View File

@ -10,11 +10,8 @@ use App\Models\Label;
use App\Models\Transaction;
use App\Models\User;
use App\Models\UserMailLog;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Cashier\Subscription;
uses(RefreshDatabase::class);
test('deletes user and all associated data when confirmed', function () {
$user = User::factory()->onboarded()->create([
'email' => 'test@example.com',

View File

@ -8,12 +8,9 @@ use App\Models\Category;
use App\Models\Label;
use App\Models\Transaction;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use function Pest\Laravel\actingAs;
uses(RefreshDatabase::class);
describe('Account Balance IDOR Protection', function () {
it('cannot update current balance for another user account via direct manipulation', function () {
$attacker = User::factory()->create();