Fixed: Display all forms on index page
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
d56cb253a9
commit
9c568176ce
|
@ -27,7 +27,7 @@ class FormApiListAction
|
||||||
{
|
{
|
||||||
return FormApiResource::collection($this->handle(
|
return FormApiResource::collection($this->handle(
|
||||||
$request->input('filter', ''),
|
$request->input('filter', ''),
|
||||||
$request->input('perPage', 10)
|
$request->input('perPage', 9999)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,4 +117,20 @@ class FormApiListActionTest extends FormTestCase
|
||||||
$this->get('/api/form?filter=' . $this->filterString(['past' => true]))
|
$this->get('/api/form?filter=' . $this->filterString(['past' => true]))
|
||||||
->assertJsonCount(1, 'data');
|
->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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue