feat(KAN-46): rebuild reusable project template management
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user