mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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
|
class AssetCheckoutWebhookNotificationTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function checkoutTargets()
|
public function checkoutTargets()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -29,18 +29,12 @@ class LicenseCheckoutWebhookNotificationTest extends TestCase
|
||||||
|
|
||||||
Setting::factory()->withWebhookEnabled()->create();
|
Setting::factory()->withWebhookEnabled()->create();
|
||||||
|
|
||||||
$checkoutTarget = $checkoutTarget();
|
event(new CheckoutableCheckedOut(
|
||||||
|
LicenseSeat::factory()->create(),
|
||||||
$licenseSeat = LicenseSeat::factory()->create();
|
$checkoutTarget(),
|
||||||
|
User::factory()->superuser()->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
|
|
||||||
// );
|
|
||||||
|
|
||||||
Notification::assertSentTo(
|
Notification::assertSentTo(
|
||||||
new AnonymousNotifiable,
|
new AnonymousNotifiable,
|
||||||
|
|
Loading…
Reference in a new issue