December 10, 2018 Root User

This particular gist test the email is queued to jobseeker and company user when jobseeker applied to the jobs.


public function email_is_sent_when_job_applied()
{
    Mail::fake();
    $this->be(cUser('jobseeker'));
    $data = $this->getData();
    $this->post('job/applyjobs', $data);
    $company = User::find($data["company_id"]);
    Mail::assertQueued(JobAppliedEmail::class, 2);
    Mail::assertQueued(JobAppliedEmail::class, function ($email) {
        return  $email->to(auth()->user()->email);
    });
    Mail::assertQueued(JobAppliedEmail::class, function ($email) use ($company) {
        return $email->hasTo($company->email);
    });
}



Profile Image

Prosperous Nepal is possible only from technological innovation.


© 2020, All right reserved.