A free open source IT asset/license management system
Fix relationship
Marcus Moore4e7c6bd2cfd8
diff --git a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.phpindex 7411cfbd3b..4898234e10 100644--- a/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php+++ b/tests/Feature/Notifications/Email/AssetAcceptanceReminderTest.php@@ -55,13 +55,13 @@ class AssetAcceptanceReminderTest extends TestCasepublic function testUserWithoutEmailAddressHandledGracefully(){- $userWithoutEmailAddress = User::factory()->create(['email' => null]);-- $this->checkoutAcceptance->assigned_to_id = $userWithoutEmailAddress->id;- $this->checkoutAcceptance->save();+ $checkoutAcceptance = CheckoutAcceptance::factory()+ ->pending()+ ->forAssignedTo(['email' => null])+ ->create();$this->actingAs($this->actor)- ->post($this->routeFor($this->checkoutAcceptance))+ ->post($this->routeFor($checkoutAcceptance))// check we didn't crash...->assertRedirect();