test scheduled node controller surfaces date error from use case
This commit is contained in:
parent
2eafe67f31
commit
659f9b88f1
1 changed files with 15 additions and 0 deletions
|
|
@ -155,6 +155,21 @@ class ScheduledNodeControllerTest extends TestCase
|
|||
$this->assertEquals(400, $response->getStatusCode());
|
||||
$body = json_decode((string) $response->getBody(), true);
|
||||
$this->assertArrayHasKey('error', $body);
|
||||
$this->assertEquals('date is required', $body['error']);
|
||||
}
|
||||
|
||||
public function test_returns_400_when_date_query_param_empty_string(): void
|
||||
{
|
||||
$response = $this->controller->getScheduledNodes(
|
||||
$this->makeRequest('', $this->user),
|
||||
new Response(),
|
||||
$this->getTodaysSchedule,
|
||||
);
|
||||
|
||||
$this->assertEquals(400, $response->getStatusCode());
|
||||
$body = json_decode((string) $response->getBody(), true);
|
||||
$this->assertArrayHasKey('error', $body);
|
||||
$this->assertEquals('date is required', $body['error']);
|
||||
}
|
||||
|
||||
public function test_excludes_future_scheduled_nodes(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue