Fixed URL validation still being true by default

This commit is contained in:
Alejandro Celaya
2022-02-01 19:12:53 +01:00
parent 48d3ab0cb4
commit 9ea8f3b590
11 changed files with 26 additions and 56 deletions

View File

@@ -230,7 +230,7 @@ class CreateShortUrlTest extends ApiTestCase
{
$expectedDetail = sprintf('Provided URL %s is invalid. Try with a different one.', $url);
[$statusCode, $payload] = $this->createShortUrl(['longUrl' => $url]);
[$statusCode, $payload] = $this->createShortUrl(['longUrl' => $url, 'validateUrl' => true]);
self::assertEquals(self::STATUS_BAD_REQUEST, $statusCode);
self::assertEquals(self::STATUS_BAD_REQUEST, $payload['status']);

View File

@@ -82,6 +82,7 @@ class EditShortUrlTest extends ApiTestCase
$resp = $this->callApiWithKey(self::METHOD_PATCH, $url, [RequestOptions::JSON => [
'longUrl' => $longUrl,
'validateUrl' => true,
]]);
self::assertEquals($expectedStatus, $resp->getStatusCode());