mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
Fix DB storage driver bug, add regression test (tenant_data_can_be_set_during_creation)
This commit is contained in:
parent
85eaefef48
commit
c81218a993
2 changed files with 12 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