Fixed: Display all forms on index page
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-07-24 16:11:29 +02:00
parent d56cb253a9
commit 9c568176ce
2 changed files with 17 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class FormApiListAction
{
return FormApiResource::collection($this->handle(
$request->input('filter', ''),
$request->input('perPage', 10)
$request->input('perPage', 9999)
));
}
}

View File

@ -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');
}
}