This repository has been archived on 2024-05-20. You can view files and clone it, but cannot push or open issues or pull requests.
PriceyBotPanel/tests/Feature/Auth/RegistrationTest.php

29 lines
690 B
PHP

<?php
namespace Tests\Feature\Auth;
use App\Providers\RouteServiceProvider;
use Livewire\Volt\Volt;
test('registration screen can be rendered', function () {
$response = $this->get('/register');
$response
->assertSeeVolt('pages.auth.register')
->assertOk();
});
test('new users can register', function () {
$component = Volt::test('pages.auth.register')
->set('name', 'Test User')
->set('email', 'test@example.com')
->set('password', 'password')
->set('password_confirmation', 'password');
$component->call('register');
$component->assertRedirect(RouteServiceProvider::HOME);
$this->assertAuthenticated();
});