Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use better method name

Christophe Bliardebe4d49c88a0
diff --git a/spec/services/work_packages/set_schedule_service_spec.rb b/spec/services/work_packages/set_schedule_service_spec.rb
index 112693167ed..e9aece7fc98 100644
--- a/spec/services/work_packages/set_schedule_service_spec.rb
+++ b/spec/services/work_packages/set_schedule_service_spec.rb
@@ -109,11 +109,12 @@ describe WorkPackages::SetScheduleService do
work_package
end
- def create_follower_child(parent, start, due)
- create_follower(start,
- due,
- {},
- parent:)
+ def create_child(parent, start_date, due_date)
+ create(:work_package,
+ subject: "child of #{parent.subject}",
+ start_date:,
+ due_date:,
+ parent:)
end
subject { instance.call(attributes) }
@@ -689,7 +690,7 @@ describe WorkPackages::SetScheduleService do
let(:child_start_date) { follower1_start_date }
let(:child_due_date) { follower1_due_date }
- let(:child_work_package) { create_follower_child(following_work_package1, child_start_date, child_due_date) }
+ let(:child_work_package) { create_child(following_work_package1, child_start_date, child_due_date) }
let!(:following) do
[following_work_package1,
@@ -718,8 +719,8 @@ describe WorkPackages::SetScheduleService do
let(:child2_start_date) { follower1_start_date + 8.days }
let(:child2_due_date) { follower1_due_date }
- let(:child1_work_package) { create_follower_child(following_work_package1, child1_start_date, child1_due_date) }
- let(:child2_work_package) { create_follower_child(following_work_package1, child2_start_date, child2_due_date) }
+ let(:child1_work_package) { create_child(following_work_package1, child1_start_date, child1_due_date) }
+ let(:child2_work_package) { create_child(following_work_package1, child2_start_date, child2_due_date) }
let!(:following) do
[following_work_package1,