From bc367b225644016c75abb5b9185562f96603c39a Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 16 Nov 2022 23:30:13 +0100 Subject: [PATCH] fix CreateTest --- tests/Feature/Member/CreateTest.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/Feature/Member/CreateTest.php diff --git a/tests/Feature/Member/CreateTest.php b/tests/Feature/Member/CreateTest.php new file mode 100644 index 00000000..f11a81b1 --- /dev/null +++ b/tests/Feature/Member/CreateTest.php @@ -0,0 +1,28 @@ +withoutExceptionHandling(); + $this->login()->loginNami(); + Country::factory()->create(['name' => 'Deutschland']); + $activity = Activity::factory()->hasAttached(Subactivity::factory()->name('Biber'))->name('€ Mitglied')->create(); + $subactivity = $activity->subactivities->first(); + + $response = $this->get(route('member.create')); + + $this->assertInertiaHas('Biber', $response, "subactivities.{$activity->id}.{$subactivity->id}"); + $this->assertInertiaHas('€ Mitglied', $response, "activities.{$activity->id}"); + } +}