Merge main into notification filters
This commit is contained in:
@@ -147,7 +147,7 @@ class TicketStatusChangedNotificationDispatchTest extends TestCase
|
||||
'project_id' => $project->id,
|
||||
'name' => 'Wrong event',
|
||||
'enabled' => true,
|
||||
'event_type' => 'ticket_created',
|
||||
'event_type' => NotificationEventType::TicketCreate->value,
|
||||
'channel' => NotificationChannel::Webhook->value,
|
||||
'channel_configuration' => json_encode([]),
|
||||
'message_template' => null,
|
||||
@@ -169,20 +169,20 @@ class TicketStatusChangedNotificationDispatchTest extends TestCase
|
||||
Queue::assertPushed(DeliverNotificationAction::class, 5);
|
||||
Queue::assertPushed(DeliverNotificationAction::class, function (DeliverNotificationAction $job) use ($webhookAction, $project, $ticket, $user, $backlogStatus, $doingStatus): bool {
|
||||
return $job->notificationActionId === $webhookAction->id
|
||||
&& $job->payload->projectId === $project->id
|
||||
&& $job->payload->projectKey === 'CORE'
|
||||
&& $job->payload->projectName === 'Core Platform'
|
||||
&& $job->payload->ticketId === $ticket->id
|
||||
&& $job->payload->ticketKey === 'CORE-1'
|
||||
&& $job->payload->ticketTitle === 'Fix webhook dispatch'
|
||||
&& $job->payload->ticketUrl === route('projects.tickets.show', [$project, $ticket])
|
||||
&& $job->payload->actorId === $user->id
|
||||
&& $job->payload->actorName === 'Erica Example'
|
||||
&& $job->payload->fromStatusId === $backlogStatus->id
|
||||
&& $job->payload->fromStatusLabel === 'Backlog'
|
||||
&& $job->payload->toStatusId === $doingStatus->id
|
||||
&& $job->payload->toStatusLabel === 'Doing'
|
||||
&& $job->payload->eventType === NotificationEventType::TicketStatusChanged
|
||||
&& $job->event->payload()->projectId === $project->id
|
||||
&& $job->event->payload()->projectKey === 'CORE'
|
||||
&& $job->event->payload()->projectName === 'Core Platform'
|
||||
&& $job->event->payload()->ticketId === $ticket->id
|
||||
&& $job->event->payload()->ticketKey === 'CORE-1'
|
||||
&& $job->event->payload()->ticketTitle === 'Fix webhook dispatch'
|
||||
&& $job->event->payload()->ticketUrl === route('projects.tickets.show', [$project, $ticket])
|
||||
&& $job->event->payload()->actorId === $user->id
|
||||
&& $job->event->payload()->actorName === 'Erica Example'
|
||||
&& $job->event->payload()->fromStatusId === $backlogStatus->id
|
||||
&& $job->event->payload()->fromStatusLabel === 'Backlog'
|
||||
&& $job->event->payload()->toStatusId === $doingStatus->id
|
||||
&& $job->event->payload()->toStatusLabel === 'Doing'
|
||||
&& $job->event->eventType() === NotificationEventType::TicketStatusChanged
|
||||
&& $job->notificationDeliveryLogId !== null;
|
||||
});
|
||||
Queue::assertPushed(DeliverNotificationAction::class, fn (DeliverNotificationAction $job): bool => $job->notificationActionId === $discordAction->id
|
||||
|
||||
Reference in New Issue
Block a user