diff --git a/app/Form/Actions/FormApiListAction.php b/app/Form/Actions/FormApiListAction.php index c7a3299b..3c74d1e8 100644 --- a/app/Form/Actions/FormApiListAction.php +++ b/app/Form/Actions/FormApiListAction.php @@ -27,7 +27,7 @@ class FormApiListAction { return FormApiResource::collection($this->handle( $request->input('filter', ''), - $request->input('perPage', 10) + $request->input('perPage', 9999) )); } } diff --git a/tests/EndToEnd/Form/FormApiListActionTest.php b/tests/EndToEnd/Form/FormApiListActionTest.php index 3e52497f..c00c4d5b 100644 --- a/tests/EndToEnd/Form/FormApiListActionTest.php +++ b/tests/EndToEnd/Form/FormApiListActionTest.php @@ -117,4 +117,20 @@ class FormApiListActionTest extends FormTestCase $this->get('/api/form?filter=' . $this->filterString(['past' => true])) ->assertJsonCount(1, 'data'); } + + public function testItDisplaysAllForms(): void + { + Carbon::setTestNow(Carbon::parse('2023-03-02')); + Storage::fake('temp'); + $this->loginNami()->withoutExceptionHandling(); + Form::factory() + ->withImage('headerImage', 'lala-2.jpg') + ->from('2023-05-05') + ->to('2023-06-07') + ->count(20) + ->create(); + + sleep(1); + $this->get('/api/form')->assertJsonCount(20, 'data'); + } }