From e11807490ee48b1d13942c5b8b4e6685c2a95576 Mon Sep 17 00:00:00 2001 From: "j.stein" Date: Wed, 19 Jan 2022 09:16:00 +0100 Subject: [PATCH] Add readied scope tests --- tests/ReadiedTenantsTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/ReadiedTenantsTest.php b/tests/ReadiedTenantsTest.php index e78e322c..3adfece0 100644 --- a/tests/ReadiedTenantsTest.php +++ b/tests/ReadiedTenantsTest.php @@ -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() {