mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:54:03 +00:00
Fix ArgumentCountError on the TenantAssetsController (#894)
* Fix ArgumentCount exception on the TenantAssetsController when no `$path` is provided * CS * CS * Handle null case explicitly * code style Co-authored-by: Bram Wubs <bram@sibi.nl> Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
ba928100e6
commit
747c192979
2 changed files with 20 additions and 2 deletions
|
|
@ -126,4 +126,19 @@ class TenantAssetTest extends TestCase
|
|||
|
||||
$this->assertSame($original, asset('foo'));
|
||||
}
|
||||
|
||||
public function test_asset_controller_returns_a_404_when_no_path_is_provided()
|
||||
{
|
||||
TenantAssetsController::$tenancyMiddleware = InitializeTenancyByRequestData::class;
|
||||
|
||||
$tenant = Tenant::create();
|
||||
|
||||
tenancy()->initialize($tenant);
|
||||
$response = $this->get(tenant_asset(null), [
|
||||
'X-Tenant' => $tenant->id,
|
||||
]);
|
||||
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue