Implement ticket types priorities and custom fields

This commit is contained in:
2026-03-25 01:28:25 +01:00
parent 3f9b83ec16
commit 35aacff318
32 changed files with 1832 additions and 1 deletions
+29
View File
@@ -6,6 +6,7 @@ use App\Models\BoardColumn;
use App\Models\Project;
use Database\Seeders\BoardColumnSeeder;
use Database\Seeders\ProjectSeeder;
use Database\Seeders\ProjectTicketMetadataSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -92,4 +93,32 @@ class ProjectTest extends TestCase
'position' => 1,
]);
}
/**
* Ensure projects expose ticket metadata relationships after seeding.
*/
public function test_projects_expose_ticket_metadata_relationships(): void
{
$this->seed([
ProjectSeeder::class,
ProjectTicketMetadataSeeder::class,
]);
$coreProject = Project::query()->where('key', 'CORE')->firstOrFail();
$this->assertSame(
['Task', 'Parent', 'Bug'],
$coreProject->ticketTypes->pluck('name')->all(),
);
$this->assertSame(
['Low', 'Medium', 'High'],
$coreProject->ticketPriorities->pluck('name')->all(),
);
$this->assertSame(
['Assignee', 'Story Points'],
$coreProject->ticketFieldDefinitions->pluck('label')->all(),
);
}
}