@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user