mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 11:34:03 +00:00
Add readied scope tests
This commit is contained in:
parent
f8eef8d2ee
commit
e11807490e
1 changed files with 16 additions and 0 deletions
|
|
@ -35,6 +35,22 @@ class ReadiedTenantsTest extends TestCase
|
|||
$this->assertCount(0, Tenant::onlyReadied()->get());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function readied_trait_imports_query_scopes()
|
||||
{
|
||||
Tenant::createReadied();
|
||||
Tenant::create();
|
||||
Tenant::create();
|
||||
|
||||
$this->assertCount(1, Tenant::onlyReadied()->get());
|
||||
|
||||
$this->assertCount(3, Tenant::withReadied(true)->get());
|
||||
|
||||
$this->assertCount(2, Tenant::withReadied(false)->get());
|
||||
|
||||
$this->assertCount(2, Tenant::withoutReadied()->get());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function readied_tenants_are_created_and_deleted_from_the_commands()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue