diff --git a/tests/Integration/Api/Client/TwoFactorControllerTest.php b/tests/Integration/Api/Client/TwoFactorControllerTest.php index 4110420333..cca0038c0c 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)->deleteJson('/api/client/account/two-factor', [ + $response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [ '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)->deleteJson('/api/client/account/two-factor', [ + $response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [ 'password' => 'password', ]); @@ -163,7 +163,7 @@ public function testNoErrorIsReturnedIfTwoFactorIsNotEnabled() /** @var User $user */ $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', ]); @@ -196,7 +196,7 @@ public function testDisablingTwoFactorRequiresValidPassword() $user = User::factory()->create(['use_totp' => true]); $this->actingAs($user) - ->deleteJson('/api/client/account/two-factor', [ + ->postJson('/api/client/account/two-factor', [ 'password' => 'foo', ]) ->assertStatus(Response::HTTP_BAD_REQUEST)