mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Fix integration tests to properly account for the rule position in the API
This commit is contained in:
@@ -85,7 +85,7 @@ class AccountControllerTest extends ClientApiIntegrationTestCase
|
||||
]);
|
||||
|
||||
$response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
$response->assertJsonPath('errors.0.code', 'required');
|
||||
$response->assertJsonPath('errors.0.meta.rule', 'required');
|
||||
$response->assertJsonPath('errors.0.detail', 'The email field is required.');
|
||||
|
||||
$response = $this->actingAs($user)->putJson('/api/client/account/email', [
|
||||
@@ -94,7 +94,7 @@ class AccountControllerTest extends ClientApiIntegrationTestCase
|
||||
]);
|
||||
|
||||
$response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
$response->assertJsonPath('errors.0.code', 'email');
|
||||
$response->assertJsonPath('errors.0.meta.rule', 'email');
|
||||
$response->assertJsonPath('errors.0.detail', 'The email must be a valid email address.');
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ class AccountControllerTest extends ClientApiIntegrationTestCase
|
||||
]);
|
||||
|
||||
$response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
$response->assertJsonPath('errors.0.code', 'confirmed');
|
||||
$response->assertJsonPath('errors.0.meta.rule', 'confirmed');
|
||||
$response->assertJsonPath('errors.0.detail', 'The password confirmation does not match.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user