Fix for tests

This commit is contained in:
Hillel Coren 2016-06-07 14:40:54 +03:00
parent 1eb334f3b4
commit 5489ade5ff
2 changed files with 9 additions and 8 deletions

View File

@ -36,7 +36,7 @@ class UserMailer extends Mailer
public function sendNotification(User $user, Invoice $invoice, $notificationType, Payment $payment = null)
{
if (!$user->email) {
if (! $user->email || $user->cannot('view', $invoice)) {
return;
}

View File

@ -50,6 +50,7 @@ class UserTableSeeder extends Seeder
'confirmed' => true,
'notify_sent' => false,
'notify_paid' => false,
'is_admin' => 1,
]);
Affiliate::create([