From 01759b241b225c126488bd95f504230b221fba79 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Fri, 29 Nov 2024 14:54:17 -0500 Subject: [PATCH] Check if the flash renders to the template, check if the flash messages are empty after rendering. --- app/tests/Controller/ControllerTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/tests/Controller/ControllerTest.php b/app/tests/Controller/ControllerTest.php index af18adb..e7696fa 100644 --- a/app/tests/Controller/ControllerTest.php +++ b/app/tests/Controller/ControllerTest.php @@ -130,10 +130,6 @@ class ControllerTest extends TestCase // the flash class is in the body for this test case $this->assertTrue(str_contains($body, "flash")); $this->assertTrue(str_contains($body, "Error message")); - - //$errorMessages = $flash->get('error'); - //$this->assertNotEmpty($errorMessages); - //$this->assertEquals('Error message', $errorMessages[0]); - //$this->assertEquals(1, count($errorMessages)); + $this->assertEmpty($flash->all()); } }