Implement test for license checkout notification

This commit is contained in:
Marcus Moore 2023-03-27 14:09:21 -07:00
parent 362d5b9fd4
commit 2cbc6276f7
No known key found for this signature in database
2 changed files with 6 additions and 13 deletions

View file

@ -13,7 +13,6 @@ use Tests\TestCase;
class AssetCheckoutWebhookNotificationTest extends TestCase class AssetCheckoutWebhookNotificationTest extends TestCase
{ {
public function checkoutTargets() public function checkoutTargets()
{ {
return [ return [

View file

@ -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,