codex ticket rework
This commit is contained in:
@@ -32,10 +32,7 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
'position' => 1,
|
||||
]);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
|
||||
$ticket = Ticket::factory()->create([
|
||||
'project_id' => $project->id,
|
||||
@@ -71,10 +68,7 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
$priority = $project->ticketPriorities()->firstOrFail();
|
||||
|
||||
$this->syncProjectPermissions($project, $user, ['view']);
|
||||
|
||||
@@ -95,6 +89,7 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
public function test_users_with_create_permission_can_add_duplicate_titled_tickets_to_backlog(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
$assignee = User::factory()->create();
|
||||
$project = Project::factory()->create([
|
||||
'key' => 'AUTH',
|
||||
]);
|
||||
@@ -103,7 +98,7 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'High',
|
||||
'position' => 1,
|
||||
'position' => 2,
|
||||
]);
|
||||
|
||||
$this->syncProjectPermissions($project, $user, ['create', 'view']);
|
||||
@@ -112,6 +107,8 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
'title' => 'Same title',
|
||||
'description' => 'Description',
|
||||
'acceptance_criteria' => 'Criteria',
|
||||
'assignee_user_id' => $assignee->id,
|
||||
'story_points' => 3,
|
||||
'ticket_type_id' => $project->ticketTypes()->firstOrFail()->id,
|
||||
'ticket_priority_id' => $priority->id,
|
||||
];
|
||||
@@ -130,14 +127,20 @@ class ProjectBacklogControllerTest extends TestCase
|
||||
'project_id' => $project->id,
|
||||
'ticket_key' => 'AUTH-1',
|
||||
'title' => 'Same title',
|
||||
'assignee_user_id' => $assignee->id,
|
||||
'author_user_id' => $user->id,
|
||||
'board_column_id' => null,
|
||||
'story_points' => 3,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('tickets', [
|
||||
'project_id' => $project->id,
|
||||
'ticket_key' => 'AUTH-2',
|
||||
'title' => 'Same title',
|
||||
'assignee_user_id' => $assignee->id,
|
||||
'author_user_id' => $user->id,
|
||||
'board_column_id' => null,
|
||||
'story_points' => 3,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseCount('ticket_worklog_entries', 2);
|
||||
|
||||
Reference in New Issue
Block a user