feat(tenant): add Desfile footer background asset migration

- Add footer background image for Desfile Pura Tendencia
- Upload and associate the asset with the tenant during migration
- Extend migration coverage to verify attachment creation and storage
This commit is contained in:
2026-08-12 13:54:05 -03:00
parent f50d3d0587
commit 45d74e166f
3 changed files with 92 additions and 0 deletions

View File

@@ -31,6 +31,11 @@ class CreateDesfilePuraTendenciaTenantTest extends TestCase
);
$migration->up();
$footerBackgroundMigration = require database_path(
'migrations/2026_08_12_060000_set_desfile_footer_background_image.php'
);
$footerBackgroundMigration->up();
$this->assertDatabaseHas('tenants', [
'codigo' => 'desfile_pura_tendencia',
'nombre' => 'Desfile Pura Tendencia',
@@ -85,11 +90,20 @@ class CreateDesfilePuraTendenciaTenantTest extends TestCase
'filename' => 'desfile_pura_tendencia_hero.png',
'type' => 'image',
]);
$footerBackgroundImageId = DB::table('tenants')
->where('codigo', 'desfile_pura_tendencia')
->value('footer_bg_image_id');
$this->assertDatabaseHas('attachments', [
'id' => $footerBackgroundImageId,
'filename' => 'desfile_pura_tendencia_footer_background.png',
'type' => 'image',
]);
foreach ([
'desfile_pura_tendencia_header.png',
'desfile_pura_tendencia_footer.png',
'desfile_pura_tendencia_hero.png',
'desfile_pura_tendencia_footer_background.png',
'entrada_pasarela.png',
] as $filename) {
$path = DB::table('attachments')->where('filename', $filename)->value('path');