mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
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:
parent
757a6b3e91
commit
fffb5a7169
10 changed files with 10 additions and 10 deletions
|
@ -11,7 +11,7 @@ use Laravel\Sanctum\HasApiTokens;
|
|||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable, HasApiTokens;
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
|
|
|
@ -38,4 +38,4 @@ test('users can logout', function () {
|
|||
|
||||
$this->assertGuest();
|
||||
$response->assertRedirect('/');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -43,4 +43,4 @@ test('email is not verified with invalid hash', function () {
|
|||
$this->actingAs($user)->get($verificationUrl);
|
||||
|
||||
expect($user->fresh()->hasVerifiedEmail())->toBeFalse();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -29,4 +29,4 @@ test('password is not confirmed with invalid password', function () {
|
|||
]);
|
||||
|
||||
$response->assertSessionHasErrors();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,4 +57,4 @@ test('password can be reset with valid token', function () {
|
|||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,4 +16,4 @@ test('new users can register', function () {
|
|||
|
||||
$this->assertAuthenticated();
|
||||
$response->assertRedirect(route('dashboard', absolute: false));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,4 +10,4 @@ test('authenticated users can visit the dashboard', function () {
|
|||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
$this->get('/dashboard')->assertOk();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,4 +37,4 @@ test('correct password must be provided to update password', function () {
|
|||
$response
|
||||
->assertSessionHasErrors('current_password')
|
||||
->assertRedirect('/settings/password');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -82,4 +82,4 @@ test('correct password must be provided to delete account', function () {
|
|||
->assertRedirect('/settings/profile');
|
||||
|
||||
expect($user->fresh())->not->toBeNull();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
test('that true is true', function () {
|
||||
expect(true)->toBeTrue();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue