refactor: reorder traits in User model and add newlines in test files

- Reordered the traits in the User model for better organization.
- Added missing newlines at the end of several test files to comply with coding standards.

These changes improve code readability and maintainability across the project.
This commit is contained in:
Yury Pikhtarev 2025-06-24 01:45:44 +04:00
commit fffb5a7169
No known key found for this signature in database
10 changed files with 10 additions and 10 deletions

View file

@ -11,7 +11,7 @@ use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable class User extends Authenticatable
{ {
/** @use HasFactory<\Database\Factories\UserFactory> */ /** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable, HasApiTokens; use HasApiTokens, HasFactory, Notifiable;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.

View file

@ -38,4 +38,4 @@ test('users can logout', function () {
$this->assertGuest(); $this->assertGuest();
$response->assertRedirect('/'); $response->assertRedirect('/');
}); });

View file

@ -43,4 +43,4 @@ test('email is not verified with invalid hash', function () {
$this->actingAs($user)->get($verificationUrl); $this->actingAs($user)->get($verificationUrl);
expect($user->fresh()->hasVerifiedEmail())->toBeFalse(); expect($user->fresh()->hasVerifiedEmail())->toBeFalse();
}); });

View file

@ -29,4 +29,4 @@ test('password is not confirmed with invalid password', function () {
]); ]);
$response->assertSessionHasErrors(); $response->assertSessionHasErrors();
}); });

View file

@ -57,4 +57,4 @@ test('password can be reset with valid token', function () {
return true; return true;
}); });
}); });

View file

@ -16,4 +16,4 @@ test('new users can register', function () {
$this->assertAuthenticated(); $this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false)); $response->assertRedirect(route('dashboard', absolute: false));
}); });

View file

@ -10,4 +10,4 @@ test('authenticated users can visit the dashboard', function () {
$this->actingAs($user = User::factory()->create()); $this->actingAs($user = User::factory()->create());
$this->get('/dashboard')->assertOk(); $this->get('/dashboard')->assertOk();
}); });

View file

@ -37,4 +37,4 @@ test('correct password must be provided to update password', function () {
$response $response
->assertSessionHasErrors('current_password') ->assertSessionHasErrors('current_password')
->assertRedirect('/settings/password'); ->assertRedirect('/settings/password');
}); });

View file

@ -82,4 +82,4 @@ test('correct password must be provided to delete account', function () {
->assertRedirect('/settings/profile'); ->assertRedirect('/settings/profile');
expect($user->fresh())->not->toBeNull(); expect($user->fresh())->not->toBeNull();
}); });

View file

@ -2,4 +2,4 @@
test('that true is true', function () { test('that true is true', function () {
expect(true)->toBeTrue(); expect(true)->toBeTrue();
}); });