1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:34:04 +00:00

Refactor tests to use pest() helper

This commit is contained in:
Samuel Štancl 2022-07-23 01:16:50 +02:00
parent 05f2a828a1
commit f9c9d8615f
26 changed files with 128 additions and 127 deletions

View file

@ -42,7 +42,7 @@ test('database data is separated', function () {
$tenant1 = Tenant::create();
$tenant2 = Tenant::create();
$this->artisan('tenants:migrate');
pest()->artisan('tenants:migrate');
tenancy()->initialize($tenant1);
@ -175,7 +175,7 @@ test('filesystem data is separated', function () {
// Check that disk prefixes respect the root_override logic
expect(getDiskPrefix('local'))->toBe($expected_storage_path . '/app/');
expect(getDiskPrefix('public'))->toBe($expected_storage_path . '/app/public/');
$this->assertSame('tenant' . tenant('id') . '/', getDiskPrefix('s3'), '/');
pest()->assertSame('tenant' . tenant('id') . '/', getDiskPrefix('s3'), '/');
// Check suffixing logic
$new_storage_path = storage_path();