feat: translations
This commit is contained in:
@@ -60,7 +60,7 @@ it('deletes the authenticated account and related data', function () {
|
||||
|
||||
$this->deleteJson('/api/auth/me')
|
||||
->assertOk()
|
||||
->assertJsonPath('message', 'Compte supprimé avec succès');
|
||||
->assertJsonPath('message', __('api.auth.deleted'));
|
||||
|
||||
$this->assertDatabaseMissing('users', ['id' => $user->getKey()]);
|
||||
$this->assertDatabaseMissing('meal_posts', ['id' => $localMealPost->getKey()]);
|
||||
|
||||
@@ -50,7 +50,7 @@ it('verifies a user from a signed email link', function () {
|
||||
|
||||
$this->getJson($url)
|
||||
->assertOk()
|
||||
->assertJsonPath('message', 'Compte vérifié avec succès.')
|
||||
->assertJsonPath('message', __('api.auth.verified'))
|
||||
->assertJsonPath('user.emailVerified', true);
|
||||
|
||||
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
|
||||
@@ -78,7 +78,7 @@ it('blocks login for unverified users', function () {
|
||||
'password' => 'password',
|
||||
])
|
||||
->assertForbidden()
|
||||
->assertJsonPath('message', 'Vérifie ton adresse email avant de te connecter.')
|
||||
->assertJsonPath('message', __('api.auth.email_not_verified'))
|
||||
->assertCookieMissing('token');
|
||||
|
||||
$this->assertDatabaseMissing('personal_access_tokens', [
|
||||
@@ -109,7 +109,7 @@ it('resends a verification email for an authenticated unverified user', function
|
||||
|
||||
$this->postJson('/api/auth/email/verification-notification')
|
||||
->assertOk()
|
||||
->assertJsonPath('message', 'Email de vérification envoyé.');
|
||||
->assertJsonPath('message', __('api.auth.verification_sent'));
|
||||
|
||||
Notification::assertSentTo($user, VerifyEmail::class);
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ it('creates one review per user for a meal post', function () {
|
||||
'rating' => 4,
|
||||
])
|
||||
->assertConflict()
|
||||
->assertJsonPath('message', 'Vous avez déjà donné un avis pour ce repas.');
|
||||
->assertJsonPath('message', __('api.post_reviews.already_exists'));
|
||||
|
||||
expect(PostReviews::query()->count())->toBe(1);
|
||||
});
|
||||
|
||||
@@ -212,5 +212,5 @@ it('requires an activity read scope before syncing strava activities', function
|
||||
$this
|
||||
->postJson('/api/strava/sync')
|
||||
->assertUnprocessable()
|
||||
->assertJsonPath('message', 'La connexion Strava doit autoriser le scope activity:read ou activity:read_all.');
|
||||
->assertJsonPath('message', __('api.strava.missing_activity_scope'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user