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