Fix null path confirmation rows
This commit is contained in:
@@ -1265,6 +1265,29 @@ it('marks projected path confirmations confirmed or stale by stable signatures',
|
||||
->and($changed['summary']['confirmations']['stale'])->toBe(1);
|
||||
});
|
||||
|
||||
it('treats null path confirmation rows as an empty confirmation set', function (): void {
|
||||
$service = selfserve_studio_graph_without_constructor();
|
||||
$method = new ReflectionMethod(selfserve_studio_graph::class, 'pathOutcomesPayload');
|
||||
|
||||
$payload = $method->invoke(
|
||||
$service,
|
||||
['department_id' => 6, 'lane_id' => 7],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
false,
|
||||
null,
|
||||
0,
|
||||
0,
|
||||
[],
|
||||
[],
|
||||
null
|
||||
);
|
||||
|
||||
expect($payload['summary']['confirmations']['total'])->toBe(0)
|
||||
->and($payload['confirmations']['removed'])->toBe([]);
|
||||
});
|
||||
|
||||
it('truncates path outcome projection when the state cap is reached', function (): void {
|
||||
$service = selfserve_studio_graph_without_constructor();
|
||||
$simulate = function (array $overrides): array {
|
||||
|
||||
Reference in New Issue
Block a user