Check the whole div tag for the error message

This commit is contained in:
Dave Smith-Hayes 2024-11-29 14:55:36 -05:00
parent 01759b241b
commit 60025c1089

View File

@ -128,7 +128,7 @@ class ControllerTest extends TestCase
$body = $response->getBody();
$body->read($body->getSize());
// the flash class is in the body for this test case
$this->assertTrue(str_contains($body, "flash"));
$this->assertTrue(str_contains($body, '<div class="flash error" role="alert">'));
$this->assertTrue(str_contains($body, "Error message"));
$this->assertEmpty($flash->all());
}