mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
[2.x] Tenant config (#145)
* TenantConfig first draft * Apply fixes from StyleCI * Add unsetTenantConfig * Fix DB storage driver bug, add regression test (tenant_data_can_be_set_during_creation) * Add tests & config keys * Apply fixes from StyleCI
This commit is contained in:
parent
d70e561106
commit
56a2bdf5af
5 changed files with 109 additions and 1 deletions
|
|
@ -94,4 +94,15 @@ class TenantClassTest extends TestCase
|
|||
$this->expectException(\BadMethodCallException::class);
|
||||
$tenant->sdjigndfgnjdfgj();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function tenant_data_can_be_set_during_creation()
|
||||
{
|
||||
Tenant::new()->withData(['foo' => 'bar'])->save();
|
||||
|
||||
$data = tenancy()->all()->first()->data;
|
||||
unset($data['id']);
|
||||
|
||||
$this->assertSame(['foo' => 'bar'], $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue