codex ticket rework
This commit is contained in:
@@ -7,7 +7,6 @@ use App\Models\Project;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketLink;
|
||||
use App\Models\TicketLinkType;
|
||||
use App\Models\TicketPriority;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
@@ -28,11 +27,11 @@ class ProjectTicketLinkControllerTest extends TestCase
|
||||
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$taskType = $project->ticketTypes()->where('system_key', 'task')->firstOrFail();
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
$taskType = $project->ticketTypes()
|
||||
->where('is_parent', false)
|
||||
->orderBy('position')
|
||||
->firstOrFail();
|
||||
$ticketLinkType = TicketLinkType::factory()->for($project)->create([
|
||||
'label' => 'Relates to',
|
||||
'position' => 1,
|
||||
@@ -88,16 +87,16 @@ class ProjectTicketLinkControllerTest extends TestCase
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
app(InitializeProjectTicketMetadata::class)->handle($otherProject);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$otherPriority = TicketPriority::factory()->for($otherProject)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$taskType = $project->ticketTypes()->where('system_key', 'task')->firstOrFail();
|
||||
$otherTaskType = $otherProject->ticketTypes()->where('system_key', 'task')->firstOrFail();
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
$otherPriority = $otherProject->ticketPriorities()->firstOrFail();
|
||||
$taskType = $project->ticketTypes()
|
||||
->where('is_parent', false)
|
||||
->orderBy('position')
|
||||
->firstOrFail();
|
||||
$otherTaskType = $otherProject->ticketTypes()
|
||||
->where('is_parent', false)
|
||||
->orderBy('position')
|
||||
->firstOrFail();
|
||||
$ticketLinkType = TicketLinkType::factory()->for($project)->create([
|
||||
'label' => 'Relates to',
|
||||
'position' => 1,
|
||||
@@ -150,11 +149,11 @@ class ProjectTicketLinkControllerTest extends TestCase
|
||||
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$taskType = $project->ticketTypes()->where('system_key', 'task')->firstOrFail();
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
$taskType = $project->ticketTypes()
|
||||
->where('is_parent', false)
|
||||
->orderBy('position')
|
||||
->firstOrFail();
|
||||
$ticketLinkType = TicketLinkType::factory()->for($project)->create([
|
||||
'label' => 'Relates to',
|
||||
'position' => 1,
|
||||
|
||||
Reference in New Issue
Block a user