feat: validate tests
This commit is contained in:
parent
025b2592b4
commit
8ebfd6badf
|
|
@ -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'],
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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'],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
'secure' => env('SESSION_SECURE_COOKIE', true),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue