mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 07:27:47 +00:00
feat: update to Laravel 12 starter kit (#1)
fix: path of ScreenGeneratorCommand
This commit is contained in:
parent
199511816e
commit
94f5cabcff
110 changed files with 3260 additions and 3524 deletions
|
|
@ -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']);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue