feat: translation codes
CI / 🧪 Tests Laravel (push) Successful in 2m34s
CI / 🐳 Build & Push Images (push) Successful in 2m26s

This commit is contained in:
2026-08-14 12:46:29 +02:00
parent 69372a49ed
commit 8b60283eeb
28 changed files with 59 additions and 62 deletions
+4 -4
View File
@@ -30,7 +30,7 @@ it('sends a password reset email with a clickable api web url', function () {
'email' => 'LEON@example.com',
])
->assertOk()
->assertJsonPath('message', __('api.auth.password_reset_link_sent'));
->assertJsonPath('code', 'PASSWORD_RESET_LINK_SENT');
Notification::assertSentTo(
$user,
@@ -99,7 +99,7 @@ it('does not reveal whether a reset email can be sent', function () {
'email' => 'missing@example.com',
])
->assertOk()
->assertJsonPath('message', __('api.auth.password_reset_link_sent'));
->assertJsonPath('code', 'PASSWORD_RESET_LINK_SENT');
Notification::assertNothingSent();
});
@@ -121,7 +121,7 @@ it('resets the password and invalidates existing api tokens', function () {
'token' => $token,
])
->assertOk()
->assertJsonPath('message', __('api.auth.password_reset'));
->assertJsonPath('code', 'PASSWORD_RESET');
expect(Hash::check('new-password', $user->fresh()->password))->toBeTrue();
@@ -208,7 +208,7 @@ it('rejects an invalid password reset token', function () {
'token' => 'invalid-token',
])
->assertUnprocessable()
->assertJsonPath('message', __('passwords.token'));
->assertJsonPath('code', 'PASSWORD_RESET_FAILED');
expect(Hash::check('new-password', $user->fresh()->password))->toBeFalse();
});