Fix KAN-3 project template flows
This commit is contained in:
@@ -285,9 +285,8 @@ class ProjectControllerTest extends TestCase
|
||||
|
||||
$project->refresh();
|
||||
|
||||
$this->assertNotSame($template->id, $project->project_template_id);
|
||||
$this->assertDatabaseHas('project_templates', [
|
||||
'id' => $project->project_template_id,
|
||||
$this->assertSame($template->id, $project->project_template_id);
|
||||
$this->assertDatabaseMissing('project_templates', [
|
||||
'project_id' => $project->id,
|
||||
'is_published' => false,
|
||||
]);
|
||||
@@ -295,6 +294,7 @@ class ProjectControllerTest extends TestCase
|
||||
$this->assertSame(false, $project->show_story_points);
|
||||
$this->assertDatabaseHas('ticket_types', [
|
||||
'project_id' => $project->id,
|
||||
'project_template_id' => $template->id,
|
||||
'name' => 'Bug',
|
||||
'position' => 1,
|
||||
'is_parent' => false,
|
||||
@@ -661,6 +661,11 @@ class ProjectControllerTest extends TestCase
|
||||
$this->assertTrue($project->show_author);
|
||||
$this->assertTrue($project->show_story_points);
|
||||
$this->assertSame(['Incident', 'Maintenance'], $project->ticketTypes()->pluck('name')->all());
|
||||
$this->assertDatabaseHas('ticket_types', [
|
||||
'project_id' => $project->id,
|
||||
'project_template_id' => $newTemplate->id,
|
||||
'name' => 'Incident',
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_project_admins_can_reset_projects_to_their_current_template_baseline(): void
|
||||
@@ -711,6 +716,11 @@ class ProjectControllerTest extends TestCase
|
||||
$this->assertTrue($project->show_author);
|
||||
$this->assertTrue($project->show_story_points);
|
||||
$this->assertSame(['Bug', 'Feature'], $project->ticketTypes()->pluck('name')->all());
|
||||
$this->assertDatabaseHas('ticket_types', [
|
||||
'project_id' => $project->id,
|
||||
'project_template_id' => $template->id,
|
||||
'name' => 'Bug',
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_project_template_switch_requires_exact_project_key_confirmation(): void
|
||||
|
||||
Reference in New Issue
Block a user