feat: validate tests
Laravel CI-CD / Tests Unitaires (push) Successful in 1m27s Details
Laravel CI-CD / Deploy with Kamal (push) Successful in 1m46s Details

This commit is contained in:
Leon Morival 2026-05-22 13:43:26 +02:00
parent 025b2592b4
commit 8ebfd6badf
4 changed files with 3 additions and 5 deletions

View File

@ -54,8 +54,7 @@ class RegisterRequest extends FormRequest
'weightGoal' => ['sometimes', Rule::enum(WeightGoal::class)], 'weightGoal' => ['sometimes', Rule::enum(WeightGoal::class)],
'pacePreference' => ['sometimes', Rule::enum(PacePreference::class)], 'pacePreference' => ['sometimes', Rule::enum(PacePreference::class)],
'sex' => ['sometimes', Rule::enum(UserSex::class)], 'sex' => ['sometimes', Rule::enum(UserSex::class)],
'date_of_birth' => ['sometimes', 'nullable', 'date_format:Y-m-d', 'before:today', 'after:1900-01-01'], 'dateOfBirth' => ['sometimes', 'nullable', 'date_format:Y-m-d', 'before:today', 'after:1900-01-01'],
]; ];
} }

View File

@ -33,7 +33,6 @@ class UpdateUserRequest extends FormRequest
'pacePreference' => ['sometimes', Rule::enum(PacePreference::class)], 'pacePreference' => ['sometimes', Rule::enum(PacePreference::class)],
'sex' => ['sometimes', Rule::enum(UserSex::class)], 'sex' => ['sometimes', Rule::enum(UserSex::class)],
'dateOfBirth' => ['sometimes', 'nullable', 'date_format:Y-m-d', 'before:today', 'after:1900-01-01'], 'dateOfBirth' => ['sometimes', 'nullable', 'date_format:Y-m-d', 'before:today', 'after:1900-01-01'],
'date_of_birth' => ['sometimes', 'nullable', 'date_format:Y-m-d', 'before:today', 'after:1900-01-01'],
]; ];
} }

View File

@ -169,7 +169,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE'), 'secure' => env('SESSION_SECURE_COOKIE', true),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -20,7 +20,7 @@ it('sends a verification email when a user registers', function () {
$this->postJson('/api/auth/register', [ $this->postJson('/api/auth/register', [
'name' => 'Leon', 'name' => 'Leon',
'email' => 'leon@example.com', 'email' => 'leon@example.com',
'password' => 'password', 'password' => 'Motsdfdepasse123*',
'locale' => 'fr-FR', 'locale' => 'fr-FR',
'physicalActivityLevel' => PhysicalActivityLevel::LIGHTLY_ACTIVE->value, 'physicalActivityLevel' => PhysicalActivityLevel::LIGHTLY_ACTIVE->value,
'weightGoal' => WeightGoal::MAINTAIN_WEIGHT->value, 'weightGoal' => WeightGoal::MAINTAIN_WEIGHT->value,