From 2c4d04d1179a1c77d355ba2112af0e572c09d6a4 Mon Sep 17 00:00:00 2001 From: Christian Flack Date: Thu, 9 Jan 2025 16:45:44 +0100 Subject: [PATCH] Add stored workflow exception id to the resource (#33) --- app/Http/Resources/StoredWorkflowExceptionResource.php | 1 + tests/Feature/DashboardWorkflowTest.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/Http/Resources/StoredWorkflowExceptionResource.php b/app/Http/Resources/StoredWorkflowExceptionResource.php index 44b09ed..5849bf0 100644 --- a/app/Http/Resources/StoredWorkflowExceptionResource.php +++ b/app/Http/Resources/StoredWorkflowExceptionResource.php @@ -38,6 +38,7 @@ public function toArray($request) } return [ + "id" => $this->id, "code" => $code, "exception" => $exception, "class" => $this->class, diff --git a/tests/Feature/DashboardWorkflowTest.php b/tests/Feature/DashboardWorkflowTest.php index 2cb325b..64cc522 100644 --- a/tests/Feature/DashboardWorkflowTest.php +++ b/tests/Feature/DashboardWorkflowTest.php @@ -61,6 +61,10 @@ public function testIndexNone() 'exceptions', 1, fn (AssertableJson $exception) => $exception + ->where( + 'id', + fn ($value) => is_string($value) || is_int($value) + ) ->whereType('code', 'string') ->whereType('exception', 'string') ->where('class', 'Activity2Class')