Skip to content

Commit 6ceeb15

Browse files
fix: updated test case for login action test
1 parent 421e53f commit 6ceeb15

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"php": "^8.2",
3333
"illuminate/support": "^12.0",
3434
"illuminate/routing": "^12.0",
35-
"illuminate/view": "^12.0"
35+
"illuminate/view": "^12.0",
36+
"livewire/blaze": "^1.0"
3637
},
3738
"require-dev": {
3839
"orchestra/testbench": "^10.0",
@@ -63,4 +64,4 @@
6364
"pestphp/pest-plugin": true
6465
}
6566
}
66-
}
67+
}

tests/Feature/Api/LoginActionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
* Ensures an unverified user is not logged in, does not enter two-factor flow,
265265
* and dispatches AuthKitEmailVerificationRequired.
266266
*/
267-
it('returns 403 and dispatches AuthKitEmailVerificationRequired when email verification is required', function () {
267+
it('returns 201 and dispatches AuthKitEmailVerificationRequired when email verification is required', function () {
268268
Event::fake();
269269

270270
Config::set('authkit.two_factor.enabled', true);
@@ -291,7 +291,7 @@
291291

292292
expect($result)->toBeInstanceOf(AuthKitActionResult::class)
293293
->and($result->ok)->toBeFalse()
294-
->and($result->status)->toBe(403)
294+
->and($result->status)->toBe(201)
295295
->and($result->flow?->is('email_verification_required'))->toBeTrue()
296296
->and($result->payload?->get('email'))->toBe('michael@example.com')
297297
->and($result->payload?->get('driver'))->toBe('link')

0 commit comments

Comments
 (0)