Updated EditShortUrlAction so that it returns the parsed short URL instead of an empty response

This commit is contained in:
Alejandro Celaya
2021-01-31 13:21:23 +01:00
parent 85bc5ce595
commit c61e1e1c0e
6 changed files with 43 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ class EditShortUrlActionTest extends TestCase
public function setUp(): void
{
$this->shortUrlService = $this->prophesize(ShortUrlServiceInterface::class);
$this->action = new EditShortUrlAction($this->shortUrlService->reveal());
$this->action = new EditShortUrlAction($this->shortUrlService->reveal(), []);
}
/** @test */
@@ -54,7 +54,7 @@ class EditShortUrlActionTest extends TestCase
$resp = $this->action->handle($request);
self::assertEquals(204, $resp->getStatusCode());
self::assertEquals(200, $resp->getStatusCode());
$updateMeta->shouldHaveBeenCalled();
}
}