From 84ef518273bee1c22dda828b09af350d42f50813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Tue, 2 Apr 2024 10:54:11 +0100 Subject: [PATCH] update protocols test --- tests/Feature/ProtocolsTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Feature/ProtocolsTest.php b/tests/Feature/ProtocolsTest.php index d468c1c..2b2c5b2 100644 --- a/tests/Feature/ProtocolsTest.php +++ b/tests/Feature/ProtocolsTest.php @@ -5,6 +5,7 @@ namespace Tests\Feature; use App\Console\Commands\ProcessProtocolsCommand; +use App\Enum\OrganisationStatus; use App\Enum\UserRole; use App\Models\Document; use App\Models\Organisation; @@ -166,6 +167,16 @@ public function it_sends_notifications_for_protocols_that_expire_today(): void $this->getPlatformAdmins(), SummaryExpiredProtocols::class ); + + $this->assertDatabaseHas('organisations', [ + 'id' => $document->organisation->id, + 'status' => OrganisationStatus::inactive, + ]); + + $this->assertDatabaseMissing('organisations', [ + 'id' => $document->organisation->id, + 'status' => OrganisationStatus::active, + ]); } /** @test */