mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Implement test for license checkout notification
This commit is contained in:
parent
362d5b9fd4
commit
2cbc6276f7
|
@ -13,7 +13,6 @@ use Tests\TestCase;
|
|||
|
||||
class AssetCheckoutWebhookNotificationTest extends TestCase
|
||||
{
|
||||
|
||||
public function checkoutTargets()
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -29,18 +29,12 @@ class LicenseCheckoutWebhookNotificationTest extends TestCase
|
|||
|
||||
Setting::factory()->withWebhookEnabled()->create();
|
||||
|
||||
$checkoutTarget = $checkoutTarget();
|
||||
|
||||
$licenseSeat = LicenseSeat::factory()->create();
|
||||
|
||||
// @todo: this has to go through the LicenseCheckoutController::store() method
|
||||
// @todo: to have the CheckoutableCheckedOut fire...
|
||||
// @todo: either change this to go through controller
|
||||
// @todo: or move that functionality to the model?
|
||||
// $licenseSeat->checkOut(
|
||||
// $checkoutTarget,
|
||||
// User::factory()->superuser()->create()->id
|
||||
// );
|
||||
event(new CheckoutableCheckedOut(
|
||||
LicenseSeat::factory()->create(),
|
||||
$checkoutTarget(),
|
||||
User::factory()->superuser()->create(),
|
||||
''
|
||||
));
|
||||
|
||||
Notification::assertSentTo(
|
||||
new AnonymousNotifiable,
|
||||
|
|
Loading…
Reference in a new issue