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