mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:34:04 +00:00
Add TenantDoesNotExist exception, fix queued migrator serialization
This commit is contained in:
parent
e98db460ec
commit
2f3924531d
5 changed files with 41 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ use Illuminate\Support\Facades\DB;
|
|||
use Illuminate\Support\Facades\Queue;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Stancl\Tenancy\Exceptions\DomainsOccupiedByOtherTenantException;
|
||||
use Stancl\Tenancy\Exceptions\TenantDoesNotExistException;
|
||||
use Stancl\Tenancy\Exceptions\TenantWithThisIdAlreadyExistsException;
|
||||
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseMigrator;
|
||||
use Stancl\Tenancy\Tenant;
|
||||
|
|
@ -266,4 +267,11 @@ class TenantManagerTest extends TestCase
|
|||
(new QueuedTenantDatabaseMigrator($tenant))->handle();
|
||||
$this->assertTrue(\Schema::hasTable('users'));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function TenantDoesNotExistException_is_thrown_when_find_is_called_on_an_id_that_does_not_belong_to_any_tenant()
|
||||
{
|
||||
$this->expectException(TenantDoesNotExistException::class);
|
||||
tenancy()->find('gjnfdgf');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue