login()->loginNami()->withoutExceptionHandling(); $formtemplate = Formtemplate::factory()->create(); $this->deleteJson(route('formtemplate.destroy', ['formtemplate' => $formtemplate])) ->assertOk(); $this->assertDatabaseCount('formtemplates', 0); Event::assertDispatched(Succeeded::class, fn (Succeeded $event) => $event->message === 'Vorlage gelöscht.'); } }