feat(KAN-46): rebuild reusable project template management
CI/CD / preconditions (pull_request) Successful in 1s
CI/CD / test_and_check_app (pull_request) Successful in 19m8s
CI/CD / Publish immutable image (pull_request) Skipped

This commit is contained in:
2026-09-15 22:42:53 +02:00
parent b226ee8d48
commit 9a7ccb1160
12 changed files with 1322 additions and 500 deletions
@@ -163,6 +163,26 @@ class ProjectTemplateControllerTest extends TestCase
->assertNotFound();
}
public function test_unlinked_templates_can_be_updated_without_an_impact_confirmation(): void
{
$user = User::factory()->create();
$source = Project::factory()->create();
$template = ProjectTemplate::factory()->create([
'source_project_id' => $source->id,
]);
$this->syncGlobalPermissions($user, ['project:create']);
$this->actingAs($user)
->patch(route('project-templates.update', $template), [
'name' => 'Updated reusable template',
'copy_areas' => ['project_settings'],
])
->assertSessionHasNoErrors()
->assertRedirect(route('project-templates.index'));
$this->assertSame('Updated reusable template', $template->fresh()->name);
}
public function test_updating_a_template_requires_warning_acknowledgement_when_projects_are_linked(): void
{
$user = User::factory()->create();