AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Tests\Feature\Auth;
  3. use App\Models\User;
  4. use Illuminate\Foundation\Testing\RefreshDatabase;
  5. use Inertia\Testing\AssertableInertia as Assert;
  6. use Tests\TestCase;
  7. class PasswordConfirmationTest extends TestCase
  8. {
  9. use RefreshDatabase;
  10. public function test_confirm_password_screen_can_be_rendered()
  11. {
  12. $user = User::factory()->create();
  13. $response = $this->actingAs($user)->get(route('password.confirm'));
  14. $response->assertOk();
  15. $response->assertInertia(fn (Assert $page) => $page
  16. ->component('auth/confirm-password'),
  17. );
  18. }
  19. public function test_password_confirmation_requires_authentication()
  20. {
  21. $response = $this->get(route('password.confirm'));
  22. $response->assertRedirect(route('login'));
  23. }
  24. }