commit compras1 2811
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-28 07:11:35 +02:00
parent d58b75c87a
commit eb32c74c56
202 changed files with 17463 additions and 1526 deletions
+14
View File
@@ -77,6 +77,20 @@ test('corrections append history preserve the original assertion and reject stal
$this->get('/conflitos/'.$original->id)->assertInertia(fn (Assert $page) => $page->has('history', 3));
});
test('personal conflict consultation protects browser history and cache without changing declarations or audit', function () {
$this->post('/conflitos', personalConflict($this->supplier->id))->assertSessionHasNoErrors();
$declaration = ConflictDeclaration::query()->firstOrFail();
$before = ConflictDeclaration::query()->get()->toArray();
$audit = AuditLog::query()->get()->toArray();
foreach (['/conflitos', '/conflitos/'.$declaration->id] as $url) {
$response = $this->get($url)->assertOk();
$response->assertViewHas('page', fn (array $page) => $page['encryptHistory'] === true);
expect($response->headers->get('Cache-Control'))->toContain('private')->toContain('no-store');
}
expect(ConflictDeclaration::query()->get()->toArray())->toBe($before)
->and(AuditLog::query()->get()->toArray())->toBe($audit);
});
test('corrections cannot remove conflicts change scope author or company', function (string $field, mixed $value) {
$this->post('/conflitos', personalConflict($this->supplier->id));
$declaration = ConflictDeclaration::query()->firstOrFail();