mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Enhanced ListDomainsAction so that it returns default redirects in the response
This commit is contained in:
@@ -22,11 +22,13 @@ class ListDomainsActionTest extends TestCase
|
||||
|
||||
private ListDomainsAction $action;
|
||||
private ObjectProphecy $domainService;
|
||||
private NotFoundRedirectOptions $options;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->domainService = $this->prophesize(DomainServiceInterface::class);
|
||||
$this->action = new ListDomainsAction($this->domainService->reveal());
|
||||
$this->options = new NotFoundRedirectOptions();
|
||||
$this->action = new ListDomainsAction($this->domainService->reveal(), $this->options);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
@@ -46,6 +48,7 @@ class ListDomainsActionTest extends TestCase
|
||||
self::assertEquals([
|
||||
'domains' => [
|
||||
'data' => $domains,
|
||||
'defaultRedirects' => $this->options,
|
||||
],
|
||||
], $payload);
|
||||
$listDomains->shouldHaveBeenCalledOnce();
|
||||
|
||||
Reference in New Issue
Block a user