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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
ask before destruction specs
Klaus Zanders4a411e8a0271
diff --git a/spec/models/work_package/ask_before_destruction_spec.rb b/spec/models/work_package/ask_before_destruction_spec.rbindex e5fcda3cdf4..0389163661b 100644--- a/spec/models/work_package/ask_before_destruction_spec.rb+++ b/spec/models/work_package/ask_before_destruction_spec.rb@@ -63,12 +63,12 @@ RSpec.describe WorkPackage dolet(:time_entry) docreate(:time_entry,hours: time_entry_hours,- work_package:,+ entity: work_package,project: work_package.project)endlet(:time_entry2) docreate(:time_entry,- work_package: work_package2,+ entity: work_package2,project: work_package2.project)end@@ -160,7 +160,7 @@ RSpec.describe WorkPackage doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package.id)+ expect(time_entry.entity).to eq(work_package)endend@@ -175,22 +175,22 @@ RSpec.describe WorkPackage doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package.id)+ expect(time_entry.entity).to eq(work_package)endend- describe 'with "nullify" as action' do+ describe 'with "nullify" as action', skip: "nullify of time entry entity is currently not possible" dolet(:action) { WorkPackage.cleanup_associated_before_destructing_if_required([work_package], user, action: "nullify") }it "returns true" doexpect(action).to be_truthyend- it "sets the work_package_id of all time entries to nil" do+ it "sets the entity of all time entries to nil" doactiontime_entry.reload- expect(time_entry.work_package_id).to be_nil+ expect(time_entry.entity).to be_nilendend@@ -214,11 +214,11 @@ RSpec.describe WorkPackage doexpect(action).to be_truthyend- it "sets the work_package_id of all time entries to the new work package" do+ it "sets the entity of all time entries to the new work package" doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package2.id)+ expect(time_entry.entity).to eq(work_package2)endit "sets the project_id of all time entries to the new work package's project" do@@ -248,11 +248,11 @@ RSpec.describe WorkPackage doexpect(action).to be_truthyend- it "sets the work_package_id of all time entries to the new work package" do+ it "sets the entity of all time entries to the new work package" doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package2.id)+ expect(time_entry.entity).to eq(work_package2)endit "sets the project_id of all time entries to the new work package's project" do@@ -281,11 +281,11 @@ RSpec.describe WorkPackage doexpect(action).to be_falseyend- it "does not alter the work_package_id of all time entries" do+ it "does not alter the entity of all time entries" doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package.id)+ expect(time_entry.entity).to eq(work_package)endend@@ -302,11 +302,11 @@ RSpec.describe WorkPackage doexpect(action).to be_falseyend- it "does not alter the work_package_id of all time entries" do+ it "does not alter the entity of all time entries" doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package.id)+ expect(time_entry.entity).to eq(work_package)endit "sets an error on work packages" do@@ -329,11 +329,11 @@ RSpec.describe WorkPackage doexpect(action).to be_falseyend- it "does not alter the work_package_id of all time entries" do+ it "does not alter the entity of all time entries" doactiontime_entry.reload- expect(time_entry.work_package_id).to eq(work_package.id)+ expect(time_entry.entity).to eq(work_package)endit "sets an error on work packages" do