1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +00:00

Remove the tenantSchemaPath helper

This commit is contained in:
lukinovec 2022-10-26 11:46:39 +02:00
parent ca38123d84
commit 6fb8838d33

View file

@ -26,7 +26,7 @@ use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
beforeEach(function () {
if (file_exists($schemaPath = tenantSchemaPath())) {
if (file_exists($schemaPath = database_path('schema/tenant-schema.dump'))) {
unlink($schemaPath);
}
@ -58,11 +58,6 @@ afterEach(function () {
}
});
function tenantSchemaPath(): string
{
return database_path('schema/tenant-schema.dump');
}
test('migrate command doesnt change the db connection', function () {
expect(Schema::hasTable('users'))->toBeFalse();
@ -130,7 +125,7 @@ test('dump command works', function () {
});
test('tenant dump file gets created as tenant-schema.dump in the database schema folder by default', function() {
config(['tenancy.migration_parameters.--schema-path' => $schemaPath = tenantSchemaPath()]);
config(['tenancy.migration_parameters.--schema-path' => $schemaPath = database_path('schema/tenant-schema.dump')]);
$tenant = Tenant::create();
Artisan::call('tenants:migrate');