Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/Password/RetentionEmailJobTest.php
<?php | <?php | ||||
namespace Tests\Feature\Jobs\Password; | namespace Tests\Feature\Jobs\Password; | ||||
use App\Jobs\Password\RetentionEmailJob; | use App\Jobs\Password\RetentionEmailJob; | ||||
use App\Mail\PasswordExpirationReminder; | use App\Mail\PasswordExpirationReminder; | ||||
use App\User; | |||||
use Illuminate\Support\Facades\Mail; | use Illuminate\Support\Facades\Mail; | ||||
use Tests\TestCase; | use Tests\TestCase; | ||||
class RetentionEmailJobTest extends TestCase | class RetentionEmailJobTest extends TestCase | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
* | * | ||||
Show All 20 Lines | class RetentionEmailJobTest extends TestCase | ||||
/** | /** | ||||
* Test job handle | * Test job handle | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function testHandle() | public function testHandle() | ||||
{ | { | ||||
$user = $this->getTestUser('PasswordRetention@UserAccount.com'); | $status = User::STATUS_ACTIVE | User::STATUS_LDAP_READY | User::STATUS_IMAP_READY; | ||||
$user = $this->getTestUser('PasswordRetention@UserAccount.com', ['status' => $status]); | |||||
$expiresOn = now()->copy()->addDays(7)->toDateString(); | $expiresOn = now()->copy()->addDays(7)->toDateString(); | ||||
Mail::fake(); | Mail::fake(); | ||||
// Assert that no jobs were pushed... | // Assert that no jobs were pushed... | ||||
Mail::assertNothingSent(); | Mail::assertNothingSent(); | ||||
$job = new RetentionEmailJob($user, $expiresOn); | $job = new RetentionEmailJob($user, $expiresOn); | ||||
Show All 22 Lines |