1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 02:22:36 +01:00

fix: TwoFactorControllerTest, again

Signed-off-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
Matthew Penner 2024-10-24 11:42:25 -06:00
parent abd36ad982
commit caab056256
No known key found for this signature in database

View File

@ -132,7 +132,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
/** @var User $user */
$user = User::factory()->create(['use_totp' => true]);
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor/disable', [
'password' => 'invalid',
]);
@ -140,7 +140,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
$response->assertJsonPath('errors.0.code', 'BadRequestHttpException');
$response->assertJsonPath('errors.0.detail', 'The password provided was not valid.');
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor/disable', [
'password' => 'password',
]);
@ -163,7 +163,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
/** @var User $user */
$user = User::factory()->create(['use_totp' => false]);
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor/disable', [
'password' => 'password',
]);
@ -196,7 +196,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
$user = User::factory()->create(['use_totp' => true]);
$this->actingAs($user)
->postJson('/api/client/account/two-factor', [
->postJson('/api/client/account/two-factor/disable', [
'password' => 'foo',
])
->assertStatus(Response::HTTP_BAD_REQUEST)