feat(project-bulk): distinguish supplier_snapshot_locked from has_deals in bulkDelete

This commit is contained in:
Дмитрий
2026-05-26 11:28:57 +03:00
parent 69aeac3756
commit 7e79bf714a
2 changed files with 18 additions and 2 deletions
@@ -43,6 +43,15 @@ class PausedAtWriteSideTest extends TestCase
$this->assertStringContainsString('is_active', $body);
}
public function test_bulk_delete_distinguishes_supplier_snapshot_lock_from_has_deals(): void
{
$body = $this->methodBody(ProjectService::class, 'bulkDelete');
$this->assertStringContainsString('supplier_snapshot_locked', $body,
'bulkDelete должен помечать пропущенные проекты reason="supplier_snapshot_locked" при guard-блоке');
$this->assertStringContainsString('has_deals', $body);
}
private function methodBody(string $class, string $method): string
{
$rm = new ReflectionMethod($class, $method);