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

Merge branch '3.x' into merge-3.x

This commit is contained in:
lukinovec 2023-02-20 09:07:06 +01:00
commit 790d7ff12a
12 changed files with 108 additions and 122 deletions

View file

@ -79,7 +79,7 @@ test('ing events can be used to cancel db creation', function () {
});
$tenant = Tenant::create();
dispatch_now(new CreateDatabase($tenant));
dispatch_sync(new CreateDatabase($tenant));
pest()->assertFalse($tenant->database()->manager()->databaseExists(
$tenant->database()->getName()
@ -171,12 +171,13 @@ test('database is not migrated if creation is disabled', function () {
})->toListener()
);
Tenant::create([
$tenant = Tenant::create([
'tenancy_create_database' => false,
'tenancy_db_name' => 'already_created',
]);
expect(pest()->hasFailed())->toBeFalse();
// assert test didn't fail
$this->assertTrue($tenant->exists());
});
class FooListener extends QueueableListener