commit melhorias compras4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 16:28:03 +02:00
parent efd97e265b
commit 36dcfdf00c
118 changed files with 6042 additions and 92 deletions
@@ -18,6 +18,15 @@ beforeEach(function () {
]];
});
test('new and existing requisition form history is encrypted without creating a process on read', function () {
$count = Requisition::query()->count();
$this->get('/requisicoes/criar')->assertOk()->assertViewHas('page', fn (array $page) => $page['encryptHistory'] === true);
expect(Requisition::query()->count())->toBe($count);
$this->postJson('/requisicoes', $this->partial)->assertRedirect();
$r = Requisition::query()->latest('id')->firstOrFail();
$this->get('/requisicoes/'.$r->id.'/editar')->assertOk()->assertViewHas('page', fn (array $page) => $page['encryptHistory'] === true);
});
test('incomplete draft persists unknown values without invented amounts and cannot reserve or submit', function () {
$entries = DB::table('budget_entries')->count();
$this->postJson('/requisicoes', $this->partial)->assertRedirect();