Mitglied loschen
Abbrechen
@@ -96,7 +97,7 @@
-
+
|
@@ -115,7 +116,7 @@
-
+
|
@@ -210,7 +211,7 @@ const sortingConfig = computed({
});
async function handleDelete() {
- await remove(deleting.value);
+ await remove(deleting.value.model, deleting.value.force);
deleting.value = null;
}
diff --git a/tests/Feature/Form/ParticipantDestroyActionTest.php b/tests/Feature/Form/ParticipantDestroyActionTest.php
index df445dfb..86bfec01 100644
--- a/tests/Feature/Form/ParticipantDestroyActionTest.php
+++ b/tests/Feature/Form/ParticipantDestroyActionTest.php
@@ -14,7 +14,7 @@ beforeEach(function () {
test()->setUpForm();
});
-it('testItCanDestroyAParticipant', function () {
+it('cancels a participant', function () {
$this->login()->loginNami()->withoutExceptionHandling();
$form = Form::factory()
->has(Participant::factory())
@@ -30,3 +30,16 @@ it('testItCanDestroyAParticipant', function () {
'id' => $form->participants->first()->id,
]);
});
+
+it('testItCanDestroyAParticipant', function () {
+ $this->login()->loginNami()->withoutExceptionHandling();
+ $form = Form::factory()
+ ->has(Participant::factory())
+ ->sections([])
+ ->create();
+
+ $this->deleteJson(route('participant.destroy', ['participant' => $form->participants->first()]), [], ['X-Force' => '1'])
+ ->assertOk();
+
+ $this->assertDatabaseCount('participants', 0);
+});