feat: update to Laravel 12 starter kit (#1)

fix: path of ScreenGeneratorCommand
This commit is contained in:
Benjamin Nussbaum 2025-02-25 12:15:35 +01:00 committed by GitHub
parent 199511816e
commit 94f5cabcff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
110 changed files with 3260 additions and 3524 deletions

View file

@ -1,18 +1,16 @@
<?php
namespace Tests\Feature\Auth;
use App\Models\User;
use Livewire\Volt\Volt;
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
test('confirm password screen can be rendered', function () {
$user = User::factory()->create();
$response = $this->actingAs($user)->get('/confirm-password');
$response
->assertSeeVolt('pages.auth.confirm-password')
->assertStatus(200);
$response->assertStatus(200);
});
test('password can be confirmed', function () {
@ -20,14 +18,13 @@ test('password can be confirmed', function () {
$this->actingAs($user);
$component = Volt::test('pages.auth.confirm-password')
->set('password', 'password');
$response = Volt::test('auth.confirm-password')
->set('password', 'password')
->call('confirmPassword');
$component->call('confirmPassword');
$component
->assertRedirect('/dashboard')
->assertHasNoErrors();
$response
->assertHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
});
test('password is not confirmed with invalid password', function () {
@ -35,12 +32,9 @@ test('password is not confirmed with invalid password', function () {
$this->actingAs($user);
$component = Volt::test('pages.auth.confirm-password')
->set('password', 'wrong-password');
$response = Volt::test('auth.confirm-password')
->set('password', 'wrong-password')
->call('confirmPassword');
$component->call('confirmPassword');
$component
->assertNoRedirect()
->assertHasErrors('password');
});
$response->assertHasErrors(['password']);
});