mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:54:05 +00:00
Remove the tenantSchemaPath helper
This commit is contained in:
parent
ca38123d84
commit
6fb8838d33
1 changed files with 2 additions and 7 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue