Teilnahmerechnungen erstellen

This commit is contained in:
2026-09-03 00:08:46 +02:00
parent a61344395a
commit 9c4c28e566
79 changed files with 4303 additions and 75 deletions
+26 -8
View File
@@ -2,18 +2,36 @@
namespace Tests\Feature;
// use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Models\Tenant;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*/
public function test_the_application_returns_a_successful_response(): void
{
$response = $this->get('/');
use RefreshDatabase;
$response->assertStatus(200);
/**
* Rauchtest über den Anfrage-Stack: die Anwendung ist mandantenfähig, ohne passenden Tenant zum Host
* beantwortet {@see \App\Middleware\IdentifyTenant} jede Anfrage mit 404. Mit passendem Tenant kommt
* die Anfrage durch und wird als Gast erwartungsgemäß zum Login geleitet.
*/
public function test_the_application_redirects_guests_to_the_login(): void
{
Tenant::create([
'slug' => 'tv',
'name' => 'Test',
'email' => 't@example.com',
'email_finance' => 'finance@example.com',
'url' => parse_url(config('app.url'), PHP_URL_HOST),
'account_name' => 'Test e.V.',
'account_iban' => 'DE00',
'account_bic' => 'XY',
'city' => 'Stadt',
'postcode' => '00000',
'is_active_local_group' => true,
'has_active_instance' => true,
]);
$this->get('/')->assertRedirect('/login');
}
}