fix tests pt 3

This commit is contained in:
Godfrey M 2024-10-17 13:48:26 -07:00
parent 83e8186d9e
commit b98058ca98
4 changed files with 4 additions and 4 deletions

View file

@ -160,7 +160,7 @@ class AccessoryCheckoutTest extends TestCase implements TestsPermissionsRequirem
]);
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
return $mail->hasTo($user) && $mail->contains($accessory);
return $mail->hasTo($user->email) && $mail->viewData['accessory']->id === $accessory->id;
});
}

View file

@ -64,7 +64,7 @@ class ConsumableCheckoutTest extends TestCase
'assigned_to' => $user->id,
]);
Mail::assertSentTo($user, CheckoutConsumableMail::class);
Mail::assertSent($user, CheckoutConsumableMail::class);
}
public function testActionLogCreatedUponCheckout()

View file

@ -171,7 +171,7 @@ class AccessoryCheckoutTest extends TestCase
]);
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
return $mail->hasTo($user->email) && $mail->accessory->is($accessory);
return $mail->hasTo($user->email) && $mail->viewData['accessory']->is($accessory);
});
}

View file

@ -66,7 +66,7 @@ class ConsumableCheckoutTest extends TestCase
]);
Mail::assertNotSent(CheckoutConsumableMail::class, function ($mail) use ($consumable, $user) {
return $mail->hasTo($user->email) && $mail->consumable->is($consumable);
return $mail->hasTo($user->email) && $mail->viewData['consumable']->is($consumable);
});
}