test(tenant): cover split website types and migration
This commit is contained in:
@@ -7,7 +7,7 @@ use App\Domains\Attachable\Models\AttachmentCrop;
|
||||
use App\Domains\Auth\Models\User;
|
||||
use App\Domains\Authorization\Enums\RoleCode;
|
||||
use App\Domains\Tenant\Models\Tenant;
|
||||
use App\Domains\Tenant\Models\WebsiteType;
|
||||
use App\Domains\Tenant\Models\StorefrontWebsiteType;
|
||||
use Database\Seeders\AuthorizationSeeder;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
@@ -19,7 +19,7 @@ class AdminAppWebsiteExtraControllerTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
private WebsiteType $websiteType;
|
||||
private StorefrontWebsiteType $websiteType;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
@@ -27,7 +27,7 @@ class AdminAppWebsiteExtraControllerTest extends TestCase
|
||||
|
||||
$this->seed(AuthorizationSeeder::class);
|
||||
|
||||
$this->websiteType = WebsiteType::query()->create([
|
||||
$this->websiteType = StorefrontWebsiteType::query()->create([
|
||||
'codigo' => 'test-store',
|
||||
'nombre' => 'Test Store',
|
||||
]);
|
||||
@@ -79,7 +79,7 @@ class AdminAppWebsiteExtraControllerTest extends TestCase
|
||||
|
||||
$this->getJson('/api/v1/adminapp/tenant/website-extras')
|
||||
->assertOk()
|
||||
->assertJsonPath('data.website_type.codigo', 'test-store')
|
||||
->assertJsonPath('data.storefront_website_type.codigo', 'test-store')
|
||||
->assertJsonPath('data.definitions.contactConfig.codigo', 'contactConfig')
|
||||
->assertJsonPath('data.definitions.contactConfig.nombre', 'Configuración de contacto')
|
||||
->assertJsonPath('data.definitions.contactConfig.is_required', false)
|
||||
@@ -407,7 +407,7 @@ class AdminAppWebsiteExtraControllerTest extends TestCase
|
||||
'codigo' => $code,
|
||||
'nombre' => ucfirst($code),
|
||||
'dominio' => "{$code}.test",
|
||||
'website_type_code' => $this->websiteType->codigo,
|
||||
'storefront_website_type_code' => $this->websiteType->codigo,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user