mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
Removed API test which is no longer relevant
This commit is contained in:
parent
970f202757
commit
277d817429
1 changed files with 0 additions and 20 deletions
|
@ -33,26 +33,6 @@ class DeleteShortUrlTest extends ApiTestCase
|
|||
self::assertEquals($domain, $payload['domain'] ?? null);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function unprocessableEntityIsReturnedWhenTryingToDeleteUrlWithTooManyVisits(): void
|
||||
{
|
||||
// Generate visits first
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
self::assertEquals(self::STATUS_FOUND, $this->callShortUrl('abc123')->getStatusCode());
|
||||
}
|
||||
$expectedDetail = 'Impossible to delete short URL with short code "abc123", since it has more than "15" '
|
||||
. 'visits.';
|
||||
|
||||
$resp = $this->callApiWithKey(self::METHOD_DELETE, '/short-urls/abc123');
|
||||
$payload = $this->getJsonResponsePayload($resp);
|
||||
|
||||
self::assertEquals(self::STATUS_UNPROCESSABLE_ENTITY, $resp->getStatusCode());
|
||||
self::assertEquals(self::STATUS_UNPROCESSABLE_ENTITY, $payload['status']);
|
||||
self::assertEquals('INVALID_SHORT_URL_DELETION', $payload['type']);
|
||||
self::assertEquals($expectedDetail, $payload['detail']);
|
||||
self::assertEquals('Cannot delete short URL', $payload['title']);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function properShortUrlIsDeletedWhenDomainIsProvided(): void
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue