codex ticket rework
This commit is contained in:
@@ -7,7 +7,6 @@ use App\Models\BoardColumn;
|
||||
use App\Models\Project;
|
||||
use App\Models\Team;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketPriority;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
@@ -155,15 +154,13 @@ class ProjectControllerTest extends TestCase
|
||||
$this->assertDatabaseHas('ticket_types', [
|
||||
'project_id' => $project->id,
|
||||
'name' => 'Task',
|
||||
'system_key' => 'task',
|
||||
'is_builtin' => true,
|
||||
'is_parent' => false,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('ticket_types', [
|
||||
'project_id' => $project->id,
|
||||
'name' => 'Parent',
|
||||
'system_key' => 'parent',
|
||||
'is_builtin' => true,
|
||||
'name' => 'Release',
|
||||
'is_parent' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -344,10 +341,7 @@ class ProjectControllerTest extends TestCase
|
||||
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
$boardColumn = BoardColumn::factory()->for($project)->create([
|
||||
'name' => 'In Progress',
|
||||
'position' => 1,
|
||||
@@ -358,7 +352,11 @@ class ProjectControllerTest extends TestCase
|
||||
'sequence_number' => 1,
|
||||
'ticket_key' => 'CORE-1',
|
||||
'ticket_priority_id' => $priority->id,
|
||||
'ticket_type_id' => $project->ticketTypes()->where('system_key', 'task')->firstOrFail()->id,
|
||||
'ticket_type_id' => $project->ticketTypes()
|
||||
->where('is_parent', false)
|
||||
->orderBy('position')
|
||||
->firstOrFail()
|
||||
->id,
|
||||
'title' => 'Delete me',
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user