mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 21:34:04 +00:00
fix test
This commit is contained in:
parent
3407faf811
commit
70ee83b3b7
1 changed files with 5 additions and 2 deletions
|
|
@ -105,14 +105,17 @@ test('central cache is persisted', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cache base prefix is customizable', function () {
|
test('cache base prefix is customizable', function () {
|
||||||
|
$originalPrefix = config('cache.prefix');
|
||||||
|
$prefixBase = 'custom_';
|
||||||
|
|
||||||
config([
|
config([
|
||||||
'tenancy.cache.prefix_base' => 'custom_'
|
'tenancy.cache.prefix_base' => $prefixBase
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$tenant1 = Tenant::create();
|
$tenant1 = Tenant::create();
|
||||||
tenancy()->initialize($tenant1);
|
tenancy()->initialize($tenant1);
|
||||||
|
|
||||||
expect('custom_' . $tenant1->id . ':')
|
expect($originalPrefix . $prefixBase . $tenant1->getTenantKey() . ':')
|
||||||
->toBe(app('cache')->getPrefix())
|
->toBe(app('cache')->getPrefix())
|
||||||
->toBe(app('cache.store')->getPrefix());
|
->toBe(app('cache.store')->getPrefix());
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue