Fix relationship

This commit is contained in:
Marcus Moore 2025-01-29 16:14:09 -08:00
parent 70aed45bfe
commit 4e7c6bd2cf
No known key found for this signature in database

View file

@ -55,13 +55,13 @@ class AssetAcceptanceReminderTest extends TestCase
public 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();