ldc-arcadia-api/tests/Feature/Api/V1/IncoSheets/IncoSheetShowTest.php
Jérémy Munsch 34b76cb397
test(feature): align feature and openapi tests with replicated Oracle tables
- Update tests to use factory static helpers and avoid hardcoded table/connection names
- Align test data columns with real replicated Oracle schema
- Remove obsolete duplicate IncoSheetsShowTest
2026-08-26 17:29:18 +02:00

36 lines
908 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Feature\Api\V1\IncoSheets;
use Database\ArcadiaReplicate\Factories\Refp\IncoFactory;
describe('IncoSheet Show Feature API', function (): void {
beforeEach(function (): void {
IncoFactory::truncate();
});
it('returns 200 OK with inco sheet details for valid inco sheet ID', function (): void {
// GIVEN
/** @var \Tests\TestCase $test */
$test = $this;
IncoFactory::new()->create([
'NO_ART' => 12345,
'DENOM_LEG' => 'Poulet Rôti 1kg Test',
]);
// WHEN
$response = $test->getJson('/api/v1/inco-sheets/12345');
// THEN
$response->assertStatus(200);
$response->assertJson([
'incoSheet' => [
'id' => '12345',
'label' => 'Poulet Rôti 1Kg Test',
],
]);
});
});