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() public function testUserWithoutEmailAddressHandledGracefully()
{ {
$userWithoutEmailAddress = User::factory()->create(['email' => null]); $checkoutAcceptance = CheckoutAcceptance::factory()
->pending()
$this->checkoutAcceptance->assigned_to_id = $userWithoutEmailAddress->id; ->forAssignedTo(['email' => null])
$this->checkoutAcceptance->save(); ->create();
$this->actingAs($this->actor) $this->actingAs($this->actor)
->post($this->routeFor($this->checkoutAcceptance)) ->post($this->routeFor($checkoutAcceptance))
// check we didn't crash... // check we didn't crash...
->assertRedirect(); ->assertRedirect();