feat: implement product attributes and tenant properties management with CRUD controllers, requests, and domain models
This commit is contained in:
@@ -33,9 +33,9 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
|
||||
$response
|
||||
->assertOk()
|
||||
->assertJsonPath('codigo', 'acme')
|
||||
->assertJsonPath('dominio', 'acme.com')
|
||||
->assertJsonPath('props.primary_color', 'blue');
|
||||
->assertJsonPath('data.codigo', 'acme')
|
||||
->assertJsonPath('data.dominio', 'acme.com')
|
||||
->assertJsonPath('data.props.primary_color', 'blue');
|
||||
}
|
||||
|
||||
public function test_it_bootstraps_a_tenant_from_a_full_url(): void
|
||||
@@ -52,8 +52,8 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
|
||||
$response
|
||||
->assertOk()
|
||||
->assertJsonPath('codigo', 'acme')
|
||||
->assertJsonPath('dominio', 'acme.com');
|
||||
->assertJsonPath('data.codigo', 'acme')
|
||||
->assertJsonPath('data.dominio', 'acme.com');
|
||||
}
|
||||
|
||||
public function test_it_returns_not_found_when_the_domain_does_not_exist(): void
|
||||
@@ -84,8 +84,8 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
|
||||
$firstResponse
|
||||
->assertCreated()
|
||||
->assertJsonPath('dominio', 'acme.com')
|
||||
->assertJsonPath('props.primary_color', 'blue');
|
||||
->assertJsonPath('data.dominio', 'acme.com')
|
||||
->assertJsonPath('data.props.primary_color', 'blue');
|
||||
|
||||
$this->assertDatabaseHas('tenant_prop_values', [
|
||||
'tenant_codigo' => 'acme',
|
||||
@@ -137,9 +137,9 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
|
||||
$successfulResponse
|
||||
->assertOk()
|
||||
->assertJsonPath('nombre', 'Acme Updated')
|
||||
->assertJsonPath('dominio', 'acme.com')
|
||||
->assertJsonPath('props.primary_color', 'green');
|
||||
->assertJsonPath('data.nombre', 'Acme Updated')
|
||||
->assertJsonPath('data.dominio', 'acme.com')
|
||||
->assertJsonPath('data.props.primary_color', 'green');
|
||||
|
||||
$failingResponse = $this->putJson("/api/tenants/{$otherTenant->id}", [
|
||||
'codigo' => 'globex',
|
||||
|
||||
Reference in New Issue
Block a user