commit compras1 2811
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-28 07:11:35 +02:00
parent d58b75c87a
commit eb32c74c56
202 changed files with 17463 additions and 1526 deletions
+6
View File
@@ -22,6 +22,12 @@ beforeEach(function () {
$this->payload = receiptPayload($this->f);
});
test('receipt preparation uses encrypted history without registering a receipt or stock movement', function () {
$this->get($this->url)->assertOk()->assertViewHas('page', fn ($page) => $page['encryptHistory'] === true)
->assertInertia(fn (Assert $page) => $page->component('receipts/order')->where('canConfirm', true));
expect(GoodsReceipt::query()->count())->toBe(0)->and(StockMovement::query()->count())->toBe(0);
});
test('partial then total receipts preserve pending quantities and credit only accepted stock', function () {
$this->postJson($this->url, receiptPayload($this->f, '0.400'))->assertCreated()->assertJsonPath('status', 'partial');
$first = GoodsReceipt::query()->firstOrFail();