mirror of
https://github.com/pterodactyl/panel.git
synced 2025-12-11 01:32:47 -06:00
fix: TwoFactorControllerTest
Signed-off-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
1d056c1652
commit
abd36ad982
@ -132,7 +132,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
|
|||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = User::factory()->create(['use_totp' => true]);
|
$user = User::factory()->create(['use_totp' => true]);
|
||||||
|
|
||||||
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
|
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
|
||||||
'password' => 'invalid',
|
'password' => 'invalid',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
|
|||||||
$response->assertJsonPath('errors.0.code', 'BadRequestHttpException');
|
$response->assertJsonPath('errors.0.code', 'BadRequestHttpException');
|
||||||
$response->assertJsonPath('errors.0.detail', 'The password provided was not valid.');
|
$response->assertJsonPath('errors.0.detail', 'The password provided was not valid.');
|
||||||
|
|
||||||
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
|
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
|
|||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = User::factory()->create(['use_totp' => false]);
|
$user = User::factory()->create(['use_totp' => false]);
|
||||||
|
|
||||||
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
|
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase
|
|||||||
$user = User::factory()->create(['use_totp' => true]);
|
$user = User::factory()->create(['use_totp' => true]);
|
||||||
|
|
||||||
$this->actingAs($user)
|
$this->actingAs($user)
|
||||||
->deleteJson('/api/client/account/two-factor', [
|
->postJson('/api/client/account/two-factor', [
|
||||||
'password' => 'foo',
|
'password' => 'foo',
|
||||||
])
|
])
|
||||||
->assertStatus(Response::HTTP_BAD_REQUEST)
|
->assertStatus(Response::HTTP_BAD_REQUEST)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user