it('redirects to homepage if no tenant subdomain is defined and user has a default tenant', function () {
$user = User::find(1);
$response = $this->actingAs($user)
->followingRedirects()
->get('https://'.config('app.home_url_tld')."/admin");
$response->assertSessionHasNoErrors()
->assertStatus(200)
->assertLocation("https://".$user->getDefaultTenant()->slug.".".config('app.home_url_tld')."/admin");
})->only();
it('redirects to homepage if no tenant subdomain is defined and user has a default tenant', function () {
$user = User::find(1);
$response = $this->actingAs($user)
->followingRedirects()
->get('https://'.config('app.home_url_tld')."/admin");
$response->assertSessionHasNoErrors()
->assertStatus(200)
->assertLocation("https://".$user->getDefaultTenant()->slug.".".config('app.home_url_tld')."/admin");
})->only();