Skip to content

Commit f0b1b51

Browse files
committed
Assert that the request did not fail before following redirects
Otherwise the original error is hidden making this test failing very hard to debug. This should also be improved in the other tests that follow redirects.
1 parent 3c4314b commit f0b1b51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

webapp/tests/Unit/Controller/Jury/JuryControllerTestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ public function testCheckAddEntityAdmin(array $element, array $expected): void
300300
$this->verifyPageResponse('GET', static::$baseUrl, 200);
301301
if (static::$add !== '') {
302302
$response = $this->helperSubmitFields($element);
303+
static::assertLessThan(400, $this->client->getInternalResponse()->getStatusCode(),
304+
$this->client->getInternalResponse()->getContent());
303305
$this->client->followRedirect();
304306
foreach ($element as $key => $value) {
305307
if (!is_array($value) && !in_array($key, static::$overviewSingleNotShown)) {

0 commit comments

Comments
 (0)