Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/UserCreateTest.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | public function testHandle(): void | ||||
$this->assertTrue($job->hasFailed()); | $this->assertTrue($job->hasFailed()); | ||||
$this->assertSame("User {$user->id} is actually deleted.", $job->failureMessage); | $this->assertSame("User {$user->id} is actually deleted.", $job->failureMessage); | ||||
// TODO: Test failures on domain sanity checks | // TODO: Test failures on domain sanity checks | ||||
$job = new \App\Jobs\User\CreateJob(123); | $job = new \App\Jobs\User\CreateJob(123); | ||||
$job->handle(); | $job->handle(); | ||||
$this->assertTrue($job->hasFailed()); | $this->assertTrue($job->isReleased()); | ||||
$this->assertSame("User 123 could not be found in the database.", $job->failureMessage); | $this->assertFalse($job->hasFailed()); | ||||
} | } | ||||
} | } |