From 277d817429f503c2c3a78ec0ff6446b933262cc6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 18 Dec 2021 18:41:11 +0100 Subject: [PATCH] Removed API test which is no longer relevant --- .../test-api/Action/DeleteShortUrlTest.php | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/module/Rest/test-api/Action/DeleteShortUrlTest.php b/module/Rest/test-api/Action/DeleteShortUrlTest.php index 01b5b7bc..5cac3dbd 100644 --- a/module/Rest/test-api/Action/DeleteShortUrlTest.php +++ b/module/Rest/test-api/Action/DeleteShortUrlTest.php @@ -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 {