Add extensive controller and model tests
This commit is contained in:
23
tests/Feature/InstallerControllerTest.php
Normal file
23
tests/Feature/InstallerControllerTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
it('redirects installer when env exists', function (): void {
|
||||
$response = $this->get('/install');
|
||||
|
||||
$response->assertRedirect('/');
|
||||
});
|
||||
|
||||
it('blocks installer post when env exists', function (): void {
|
||||
$response = $this->post('/install', [
|
||||
'app_url' => 'https://example.com',
|
||||
'db_host' => '127.0.0.1',
|
||||
'db_port' => 3306,
|
||||
'db_database' => 'test',
|
||||
'db_username' => 'user',
|
||||
'db_password' => 'pass',
|
||||
'admin_name' => 'Admin',
|
||||
'admin_email' => 'admin@example.com',
|
||||
'admin_password' => 'Password123!',
|
||||
]);
|
||||
|
||||
$response->assertRedirect('/');
|
||||
});
|
||||
Reference in New Issue
Block a user