login()->loginNami()->withoutExceptionHandling(); $activity = Activity::factory()->name('Asas')->hasAttached(Subactivity::factory()->name('Pupu'))->create(); $response = $this->get(route('activity.edit', ['activity' => $activity])); $this->assertInertiaHas([ 'name' => 'Asas', 'is_filterable' => false, 'subactivities' => [$activity->subactivities->first()->id], 'subactivity_model' => [ 'activities' => [$activity->id], 'is_age_group' => false, 'is_filterable' => false, 'name' => '', ], ], $response, 'data'); $this->assertInertiaHas([ 'id' => $activity->subactivities->first()->id, 'name' => 'Pupu', ], $response, 'meta.subactivities.0'); } }