mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
fix tests pt 3
This commit is contained in:
parent
83e8186d9e
commit
b98058ca98
|
@ -160,7 +160,7 @@ class AccessoryCheckoutTest extends TestCase implements TestsPermissionsRequirem
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
|
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
|
||||||
return $mail->hasTo($user) && $mail->contains($accessory);
|
return $mail->hasTo($user->email) && $mail->viewData['accessory']->id === $accessory->id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ConsumableCheckoutTest extends TestCase
|
||||||
'assigned_to' => $user->id,
|
'assigned_to' => $user->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Mail::assertSentTo($user, CheckoutConsumableMail::class);
|
Mail::assertSent($user, CheckoutConsumableMail::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testActionLogCreatedUponCheckout()
|
public function testActionLogCreatedUponCheckout()
|
||||||
|
|
|
@ -171,7 +171,7 @@ class AccessoryCheckoutTest extends TestCase
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
|
Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($accessory, $user) {
|
||||||
return $mail->hasTo($user->email) && $mail->accessory->is($accessory);
|
return $mail->hasTo($user->email) && $mail->viewData['accessory']->is($accessory);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ConsumableCheckoutTest extends TestCase
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Mail::assertNotSent(CheckoutConsumableMail::class, function ($mail) use ($consumable, $user) {
|
Mail::assertNotSent(CheckoutConsumableMail::class, function ($mail) use ($consumable, $user) {
|
||||||
return $mail->hasTo($user->email) && $mail->consumable->is($consumable);
|
return $mail->hasTo($user->email) && $mail->viewData['consumable']->is($consumable);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue