feat(menu): update validation rules and structure for contact content in MenuSeeder and related tests

This commit is contained in:
2026-07-24 09:41:13 -03:00
parent 460eec3c78
commit f6ce85cbde
3 changed files with 75 additions and 17 deletions

View File

@@ -50,8 +50,17 @@ class MenuSeederTest extends TestCase
);
$this->assertSame(
'required|array|size:2',
$contact->static_content_schema['map_locations.*']
$contact->static_content_schema['locations.*.addresses.*.coordinates']
);
$this->assertSame(
'required|string',
$contact->static_content_schema['locations.*.addresses.*.address']
);
$this->assertSame(
'required|numeric|between:-90,90',
$contact->static_content_schema['locations.*.addresses.*.coordinates.0']
);
$this->assertSame('prohibited', $contact->static_content_schema['map_locations']);
}
public function test_it_assigns_help_to_the_supported_tenants_with_faq_content(): void
@@ -89,15 +98,19 @@ class MenuSeederTest extends TestCase
'rosario' => [
'label' => 'Rosario',
'addresses' => [
'Av. San Lorenzo 1542',
[
'label' => 'Gigante de Arroyito',
'address' => 'Av. Génova 640, Rosario',
'coordinates' => [-32.913997, -60.674567],
],
[
'label' => 'Telepagos',
'address' => 'Rioja 1150, piso 12, dpto. 3, Rosario',
'coordinates' => [-32.946820, -60.639320],
],
],
],
],
'map_locations' => [
'gigante_de_arroyito' => [-32.913997, -60.674567],
'punto_centro' => [-32.946820, -60.639320],
'punto_sur' => [-32.971510, -60.650640],
],
];
foreach ([$sonder, $fiesta] as $tenant) {