Skip to content

A free open source IT asset/license management system

Scaffold tests

Marcus Moore73f19ff4e7d6
diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php
index 4ca34ca87e..323cb5247e 100644
--- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php
+++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php
@@ -25,10 +25,8 @@ class EmailNotificationsUponCheckinTest extends TestCase
Mail::fake();
}
- public function testCheckInEmailSentToUserIfSettingEnabled()
+ public function test_check_in_email_sent_to_user_if_setting_enabled()
{
- Mail::fake();
-
$user = User::factory()->create();
$asset = Asset::factory()->assignedToUser($user)->create();
@@ -39,13 +37,11 @@ class EmailNotificationsUponCheckinTest extends TestCase
Mail::assertSent(CheckinAssetMail::class, function($mail) use ($user) {
return $mail->hasTo($user->email);
});
-
}
- public function testCheckInEmailNotSentToUserIfSettingDisabled()
+ public function test_check_in_email_not_sent_to_user_if_setting_disabled()
{
$this->settings->disableAdminCC();
- Mail::fake();
$user = User::factory()->create();
$checkoutables = collect([
@@ -93,7 +89,12 @@ class EmailNotificationsUponCheckinTest extends TestCase
});
}
- public function testAdminCCEmailStillSentWhenCategoryEmailIsNotSetToSendEmailToUser()
+ public function test_handles_user_not_having_email_address_set()
+ {
+ $this->markTestIncomplete();
+ }
+
+ public function test_admin_alert_email_still_sent_when_category_email_is_not_set_to_send_email_to_user()
{
$this->settings->enableAdminCC('[email protected]');
@@ -112,6 +113,11 @@ class EmailNotificationsUponCheckinTest extends TestCase
});
}
+ public function test_alert_email_still_sent_when_user_has_no_email_address()
+ {
+ $this->markTestIncomplete();
+ }
+
private function fireCheckInEvent($asset, $user): void
{
event(new CheckoutableCheckedIn(