From 7e9c564d0b1398eafaff1fedfc16773e11b5163d Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 30 Jan 2025 11:47:43 -0800 Subject: [PATCH] Simplify test --- .../Email/AssetAcceptanceReminderTest.php | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php index d7c89e041e2..db3de3c54cf 100644 --- a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php +++ b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php @@ -82,28 +82,9 @@ public function testUserWithoutEmailAddressHandledGracefully($callback) Mail::assertNotSent(CheckoutAssetMail::class); } - public static function acceptances() + public function testReminderIsSentToUser() { - yield 'User with locale set' => [ - function () { - return CheckoutAcceptance::factory()->pending()->create(); - } - ]; - - yield 'User without locale set' => [ - function () { - $checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create(); - $checkoutAcceptance->assignedTo->update(['locale' => null]); - - return $checkoutAcceptance; - } - ]; - } - - #[DataProvider('acceptances')] - public function testReminderIsSentToUser($callback) - { - $checkoutAcceptance = $callback(); + $checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create(); $this->actingAs(User::factory()->canViewReports()->create()) ->post($this->routeFor($checkoutAcceptance))