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

added // todo@tests

This commit is contained in:
Abrar Ahmad 2022-07-01 12:21:41 +05:00
parent c515bbfaa1
commit 8f1ebde3ab
6 changed files with 6 additions and 2 deletions

View file

@ -89,6 +89,7 @@ test('central helper doesnt change tenancy state when called in central context'
expect(tenant())->toBeNull();
});
// todo@tests
function contextIsSwitchedWhenTenancyInitialized()
{
config(['tenancy.bootstrappers' => [

View file

@ -182,7 +182,6 @@ test('filesystem data is separated', function () {
expect($new_storage_path)->toEqual($expected_storage_path);
});
// Helpers
function getDiskPrefix(string $disk): string
{
/** @var FilesystemAdapter $disk */

View file

@ -179,6 +179,7 @@ test('run command with array of tenants works', function () {
->expectsOutput('Tenant: ' . $tenantId2);
});
// todo@tests
function runCommandWorks(): void
{
$id = Tenant::create()->getTenantKey();
@ -191,6 +192,7 @@ function runCommandWorks(): void
->expectsOutput('xyz');
}
// todo@tests
function databaseConnectionSwitchedToDefault()
{
$originalDBName = DB::connection()->getDatabaseName();

View file

@ -502,6 +502,7 @@ test('an event is fired for all touched resources', function () {
});
});
// todo@tests
function creatingResourceInTenantDatabaseCreatesAndMapInCentralDatabase()
{
// Assert no user in central DB

View file

@ -227,6 +227,7 @@ test('the model returned by the tenant helper has unique and exists validation r
expect($existsFails)->toBeFalse();
});
// todo@tests
function primaryModelsScopedToCurrentTenant()
{
// acme context
@ -273,6 +274,7 @@ function primaryModelsScopedToCurrentTenant()
expect(Post::count())->toBe(1);
}
// todo@tests
function secondaryModelsAreScopedToCurrentTenant()
{
// acme context

View file

@ -238,7 +238,6 @@ dataset('database_manager_provider', [
['sqlsrv', MicrosoftSQLDatabaseManager::class]
]);
// Helpers
function createUsersTable()
{
Schema::create('users', function (Blueprint $table) {