feat: harden tenant settings and import pipeline
This commit is contained in:
@@ -71,7 +71,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
|
||||
$this->assertDatabaseHas('tenants', [
|
||||
'id' => $this->tenant->id,
|
||||
'settings' => $settingsData['settings'],
|
||||
'settings' => json_encode($settingsData['settings']),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
$response = $this->authenticatedRequest('POST', '/api/v1/tenant/settings/reset');
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJson(['message' => 'Settings auf Standardwerte zurückgesetzt.'])
|
||||
->assertJson(['message' => 'Settings auf Standardwerte zurueckgesetzt.'])
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#3B82F6')
|
||||
->assertJsonPath('data.settings.features.photo_likes_enabled', true);
|
||||
|
||||
@@ -136,7 +136,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJson(['available' => true])
|
||||
->assertJson(['message' => 'Domain ist verfügbar.']);
|
||||
->assertJson(['message' => 'Domain ist verfuegbar.']);
|
||||
|
||||
// Invalid domain format
|
||||
$response = $this->authenticatedRequest('POST', '/api/v1/tenant/settings/validate-domain', [
|
||||
@@ -145,7 +145,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJson(['available' => false])
|
||||
->assertJson(['message' => 'Ungültiges Domain-Format.']);
|
||||
->assertJson(['message' => 'Ungueltiges Domain-Format.']);
|
||||
|
||||
// Taken domain (create another tenant with same domain)
|
||||
$otherTenant = Tenant::factory()->create(['custom_domain' => 'taken.example.com']);
|
||||
@@ -187,4 +187,6 @@ class SettingsApiTest extends TenantTestCase
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#3B82F6') // Default for this tenant
|
||||
->assertJsonMissing(['#FF0000']); // Other tenant's color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user