mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-16 16:37:47 +00:00
refactor: rebase on Livewire 4 starter kit
This commit is contained in:
parent
b097b0a7d7
commit
e660da46fb
69 changed files with 1967 additions and 942 deletions
|
|
@ -7,33 +7,7 @@ uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
|
|||
test('confirm password screen can be rendered', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$response = $this->actingAs($user)->get('/confirm-password');
|
||||
$response = $this->actingAs($user)->get(route('password.confirm'));
|
||||
|
||||
$response->assertStatus(200);
|
||||
});
|
||||
|
||||
test('password can be confirmed', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
|
||||
$response = Livewire::test('auth.confirm-password')
|
||||
->set('password', 'password')
|
||||
->call('confirmPassword');
|
||||
|
||||
$response
|
||||
->assertHasNoErrors()
|
||||
->assertRedirect(route('dashboard', absolute: false));
|
||||
});
|
||||
|
||||
test('password is not confirmed with invalid password', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
|
||||
$response = Livewire::test('auth.confirm-password')
|
||||
->set('password', 'wrong-password')
|
||||
->call('confirmPassword');
|
||||
|
||||
$response->assertHasErrors(['password']);
|
||||
$response->assertOk();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue