Add id to participant index
This commit is contained in:
parent
323f136e40
commit
cce9d4fa3e
|
@ -23,6 +23,7 @@ class ParticipantResource extends JsonResource
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
...$this->getModel()->getFields()->present(),
|
...$this->getModel()->getFields()->present(),
|
||||||
|
'id' => $this->id,
|
||||||
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
|
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
|
||||||
'created_at_display' => $this->created_at->format('d.m.Y'),
|
'created_at_display' => $this->created_at->format('d.m.Y'),
|
||||||
'children_count' => $this->children_count,
|
'children_count' => $this->children_count,
|
||||||
|
|
|
@ -35,6 +35,7 @@ class ParticipantIndexActionTest extends FormTestCase
|
||||||
|
|
||||||
$this->callFilter('form.participant.index', [], ['form' => $form])
|
$this->callFilter('form.participant.index', [], ['form' => $form])
|
||||||
->assertOk()
|
->assertOk()
|
||||||
|
->assertJsonPath('data.0.id', $form->participants->first()->id)
|
||||||
->assertJsonPath('data.0.vorname', 'Max')
|
->assertJsonPath('data.0.vorname', 'Max')
|
||||||
->assertJsonPath('data.0.vorname_display', 'Max')
|
->assertJsonPath('data.0.vorname_display', 'Max')
|
||||||
->assertJsonPath('data.0.stufe', 'Pfadfinder')
|
->assertJsonPath('data.0.stufe', 'Pfadfinder')
|
||||||
|
|
Loading…
Reference in New Issue