Skip to content

Commit abd36ad

Browse files
committed
fix: TwoFactorControllerTest
Signed-off-by: Matthew Penner <me@matthewp.io>
1 parent 1d056c1 commit abd36ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Integration/Api/Client/TwoFactorControllerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ public function testTwoFactorCanBeDisabledOnAccount()
132132
/** @var User $user */
133133
$user = User::factory()->create(['use_totp' => true]);
134134

135-
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
135+
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
136136
'password' => 'invalid',
137137
]);
138138

139139
$response->assertStatus(Response::HTTP_BAD_REQUEST);
140140
$response->assertJsonPath('errors.0.code', 'BadRequestHttpException');
141141
$response->assertJsonPath('errors.0.detail', 'The password provided was not valid.');
142142

143-
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
143+
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
144144
'password' => 'password',
145145
]);
146146

@@ -163,7 +163,7 @@ public function testNoErrorIsReturnedIfTwoFactorIsNotEnabled()
163163
/** @var User $user */
164164
$user = User::factory()->create(['use_totp' => false]);
165165

166-
$response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [
166+
$response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [
167167
'password' => 'password',
168168
]);
169169

@@ -196,7 +196,7 @@ public function testDisablingTwoFactorRequiresValidPassword()
196196
$user = User::factory()->create(['use_totp' => true]);
197197

198198
$this->actingAs($user)
199-
->deleteJson('/api/client/account/two-factor', [
199+
->postJson('/api/client/account/two-factor', [
200200
'password' => 'foo',
201201
])
202202
->assertStatus(Response::HTTP_BAD_REQUEST)

0 commit comments

Comments
 (0)