mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Fixed URL validation still being true by default
This commit is contained in:
@@ -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']);
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user