Teilnahmerechnungen erstellen
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user