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

This commit is contained in:
2026-11-28 18:16:04 +02:00
parent 060c119ba1
commit 1ddabbbdcc
41 changed files with 1341 additions and 138 deletions
+11
View File
@@ -110,6 +110,17 @@ test('allocation enforces current Finance access and refuses unavailable or unau
expect(SupplyRecord::query()->where('kind', 'expense_allocation')->count())->toBe(0);
});
test('denied expense attribution provides a Portuguese return path without exposing the financial source or changing JSON refusals', function () {
$this->actingAs($this->f['issuer']);
$url = '/pagamentos/'.$this->payment->id.'/categorias';
$this->get($url)->assertForbidden()->assertSee('Acesso reservado')->assertSee('Voltar ao painel')
->assertSee('lang="pt-MZ"', false)->assertDontSee($this->f['invoice']->number)
->assertDontSee('TEST-PAY-ACCOUNT')->assertDontSee('TEST-EXT-01');
$this->getJson($url)->assertForbidden()->assertJsonStructure(['message'])
->assertDontSee('<!DOCTYPE html>', false)->assertDontSee('TEST-PAY-ACCOUNT');
expect(SupplyRecord::query()->where('kind', 'expense_allocation')->count())->toBe(0);
});
test('incomplete confirmation or missing allocation audit keeps analytical attribution indeterminate', function () {
$actor = $this->f['validator'];
$this->service->save($actor, $this->payment->id, $this->input);