A free open source IT asset/license management system
Simplify test
Marcus Moore7e9c564d0b13
diff --git a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.phpindex d7c89e041e..db3de3c54c 100644--- a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php+++ b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php@@ -82,28 +82,9 @@ class AssetAcceptanceReminderTest extends TestCaseMail::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))