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