Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/TrialEndEmailTest.php
<?php | <?php | ||||
namespace Tests\Feature\Jobs; | namespace Tests\Feature\Jobs; | ||||
use App\Jobs\TrialEndEmail; | use App\Jobs\TrialEndEmail; | ||||
use App\Mail\TrialEnd; | use App\Mail\TrialEnd; | ||||
use App\User; | |||||
use Illuminate\Support\Facades\Mail; | use Illuminate\Support\Facades\Mail; | ||||
use Tests\TestCase; | use Tests\TestCase; | ||||
class TrialEndEmailTest extends TestCase | class TrialEndEmailTest extends TestCase | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
* | * | ||||
Show All 20 Lines | class TrialEndEmailTest extends TestCase | ||||
/** | /** | ||||
* Test job handle | * Test job handle | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function testHandle() | public function testHandle() | ||||
{ | { | ||||
$user = $this->getTestUser('PaymentEmail@UserAccount.com'); | $status = User::STATUS_ACTIVE | User::STATUS_LDAP_READY | User::STATUS_IMAP_READY; | ||||
$user = $this->getTestUser('PaymentEmail@UserAccount.com', ['status' => $status]); | |||||
$user->setSetting('external_email', 'ext@email.tld'); | $user->setSetting('external_email', 'ext@email.tld'); | ||||
Mail::fake(); | Mail::fake(); | ||||
// Assert that no jobs were pushed... | // Assert that no jobs were pushed... | ||||
Mail::assertNothingSent(); | Mail::assertNothingSent(); | ||||
$job = new TrialEndEmail($user); | $job = new TrialEndEmail($user); | ||||
Show All 11 Lines |