mirror of
https://github.com/archtechx/tenancy.git
synced 2026-09-20 12:34:03 +00:00
Add afterEach cleanup to TenantAssetTest
This commit is contained in:
parent
5e54e3e7d9
commit
9403d8c8fd
1 changed files with 6 additions and 2 deletions
|
|
@ -41,6 +41,12 @@ beforeEach(function () {
|
||||||
Event::listen(TenancyEnded::class, RevertToCentralContext::class);
|
Event::listen(TenancyEnded::class, RevertToCentralContext::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
TenantAssetController::$headers = [];
|
||||||
|
TenantAssetController::$publicDisk = null;
|
||||||
|
InitializeTenancyByRequestData::$onFail = null;
|
||||||
|
});
|
||||||
|
|
||||||
test('asset can be accessed using the url returned by the tenant asset helper', function () {
|
test('asset can be accessed using the url returned by the tenant asset helper', function () {
|
||||||
config(['tenancy.identification.default_middleware' => InitializeTenancyByRequestData::class]);
|
config(['tenancy.identification.default_middleware' => InitializeTenancyByRequestData::class]);
|
||||||
|
|
||||||
|
|
@ -229,8 +235,6 @@ test('TenantAssetController headers are configurable', function () {
|
||||||
|
|
||||||
$response->assertSuccessful();
|
$response->assertSuccessful();
|
||||||
$response->assertHeader('X-Foo', 'Bar');
|
$response->assertHeader('X-Foo', 'Bar');
|
||||||
|
|
||||||
TenantAssetController::$headers = []; // reset static property
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('global asset helper returns the same url regardless of tenancy initialization', function () {
|
test('global asset helper returns the same url regardless of tenancy initialization', function () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue