withoutExceptionHandling()->login()->loginNami(); $subscription = Subscription::factory()->name('hi')->forFee()->children([ new Child('a', 1400), new Child('b', 1500), ])->create(); $response = $this->from('/subscription')->delete("/subscription/{$subscription->id}"); $response->assertRedirect('/subscription'); $this->assertDatabaseCount('subscription_children', 0); $this->assertDatabaseCount('subscriptions', 0); } }