fix: allow authorised fiscal maintenance by the same responsible person
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -56,7 +56,7 @@ class SimulationTaxRuleGovernanceTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_rule_requires_independent_review_approval_publication_and_records_hash_chained_versions(): void
|
||||
public function test_rule_allows_separate_actors_and_records_hash_chained_versions(): void
|
||||
{
|
||||
$this->actingAs($this->editor);
|
||||
$created = $this->postJson('/api/v2/investment/admin/tax-rules', $this->rulePayload())
|
||||
@@ -66,9 +66,6 @@ class SimulationTaxRuleGovernanceTest extends TestCase
|
||||
$this->postJson("/api/v2/investment/admin/tax-rules/{$id}/submit", $this->transitionPayload(1))
|
||||
->assertOk()->assertJsonPath('status', 'submitted')->assertJsonPath('version_no', 2);
|
||||
|
||||
$this->postJson("/api/v2/investment/admin/tax-rules/{$id}/review", $this->transitionPayload(2))
|
||||
->assertForbidden();
|
||||
|
||||
$this->actingAs($this->reviewer)
|
||||
->postJson("/api/v2/investment/admin/tax-rules/{$id}/review", $this->transitionPayload(2))
|
||||
->assertOk()->assertJsonPath('status', 'reviewed')->assertJsonPath('reviewer_id', $this->reviewer->id);
|
||||
@@ -135,9 +132,9 @@ class SimulationTaxRuleGovernanceTest extends TestCase
|
||||
->assertOk()->assertJsonPath('status', 'suspended');
|
||||
}
|
||||
|
||||
public function test_draft_edit_uses_optimistic_locking_and_other_roles_cannot_create_rules(): void
|
||||
public function test_draft_edit_uses_optimistic_locking_and_unauthorised_users_cannot_create_rules(): void
|
||||
{
|
||||
$this->actingAs($this->reviewer)->postJson('/api/v2/investment/admin/tax-rules', $this->rulePayload())->assertForbidden();
|
||||
$this->actingAs(User::factory()->withTwoFactor()->create())->postJson('/api/v2/investment/admin/tax-rules', $this->rulePayload())->assertForbidden();
|
||||
|
||||
$this->actingAs($this->editor);
|
||||
$created = $this->postJson('/api/v2/investment/admin/tax-rules', $this->rulePayload())->assertCreated();
|
||||
|
||||
Reference in New Issue
Block a user