From caab0562561228b02355618904b25dce66550a94 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Thu, 24 Oct 2024 11:42:25 -0600 Subject: [PATCH] fix: TwoFactorControllerTest, again Signed-off-by: Matthew Penner --- tests/Integration/Api/Client/TwoFactorControllerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Integration/Api/Client/TwoFactorControllerTest.php b/tests/Integration/Api/Client/TwoFactorControllerTest.php index cca0038c0c..5c3d80388d 100644 --- a/tests/Integration/Api/Client/TwoFactorControllerTest.php +++ b/tests/Integration/Api/Client/TwoFactorControllerTest.php @@ -132,7 +132,7 @@ public function testTwoFactorCanBeDisabledOnAccount() /** @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 @@ public function testTwoFactorCanBeDisabledOnAccount() $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 @@ public function testNoErrorIsReturnedIfTwoFactorIsNotEnabled() /** @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 @@ public function testDisablingTwoFactorRequiresValidPassword() $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)