Skip to content

Commit 164d76b

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. (cherry picked from commit 5c5b651)
1 parent a188c65 commit 164d76b

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)