feat: translation codes
This commit is contained in:
@@ -133,7 +133,7 @@ it('records a failed meal image analysis attempt', function () {
|
||||
'image' => fakeMealAnalysisImage(),
|
||||
])
|
||||
->assertStatus(502)
|
||||
->assertJsonPath('message', __('api.meal_image_analysis.failed'));
|
||||
->assertJsonPath('code', 'MEAL_ANALYSIS_FAILED');
|
||||
|
||||
Exceptions::assertReported(\RuntimeException::class);
|
||||
|
||||
@@ -172,7 +172,7 @@ it('requires an active subscription to analyze a meal image', function () {
|
||||
'image' => fakeMealAnalysisImage(),
|
||||
])
|
||||
->assertStatus(402)
|
||||
->assertJsonPath('message', __('api.meal_image_analysis.subscription_required'));
|
||||
->assertJsonPath('code', 'MEAL_ANALYSIS_SUBSCRIPTION_REQUIRED');
|
||||
|
||||
expect(AiUsage::query()->count())->toBe(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user