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

Update test to have a to_id present

Henriette Darge2accaac69ada
diff --git a/spec/contracts/relations/update_contract_spec.rb b/spec/contracts/relations/update_contract_spec.rb
index 29207d11ad7..2ef6e319c77 100644
--- a/spec/contracts/relations/update_contract_spec.rb
+++ b/spec/contracts/relations/update_contract_spec.rb
@@ -46,8 +46,13 @@ RSpec.describe Relations::UpdateContract do
let(:contract) { described_class.new(relation, current_user) }
context "when an isolated relation is reversed" do
+ let(:relation_from_wp) { create(:work_package) }
+ let(:relation_to_wp) { create(:work_package) }
let(:relation) do
- create(:relation, relation_type: Relation::TYPE_BLOCKS)
+ create(:relation,
+ from: relation_from_wp,
+ to: relation_to_wp,
+ relation_type: Relation::TYPE_BLOCKS)
end
before do