feat: demonstrar percurso IVA QA e consolidar revisao
This commit is contained in:
@@ -147,4 +147,15 @@ class SimulationFiscalQaPreviewTest extends TestCase
|
||||
$rule->update(['rule_definition' => $definition]);
|
||||
$this->preview()->assertUnprocessable()->assertJsonPath('message', 'Este percurso preserva o valor exacto e não aplica arredondamento automático.');
|
||||
}
|
||||
|
||||
public function test_qa_review_page_uses_existing_administration_and_environment_guards(): void
|
||||
{
|
||||
$path = '/management/investment/tax-rules/'.$this->ruleId.'/qa-review';
|
||||
$this->get($path)->assertRedirect('/login');
|
||||
$this->actingAs($this->editor)->get($path)->assertOk()->assertInertia(fn ($page) => $page
|
||||
->component('management/fiscal-qa-review')->where('rule.id', $this->ruleId)->where('rule.code', 'IVA-GERAL-BASE-LIQUIDA'));
|
||||
$this->actingAs(User::factory()->withTwoFactor()->create())->get($path)->assertForbidden();
|
||||
config(['database.connections.pgsql.url' => 'not-an-isolated-qa-target']);
|
||||
$this->actingAs($this->editor)->get($path)->assertNotFound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user