1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 23:44:03 +00:00

Add readied scope tests

This commit is contained in:
j.stein 2022-01-19 09:16:00 +01:00
parent f8eef8d2ee
commit e11807490e

View file

@ -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()
{