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
fix relation representer spec
ulferts4e5c5649e6c8
diff --git a/spec/lib/api/v3/relations/relation_representer_spec.rb b/spec/lib/api/v3/relations/relation_representer_spec.rbindex c67e99a0783..75ddb7d5472 100644--- a/spec/lib/api/v3/relations/relation_representer_spec.rb+++ b/spec/lib/api/v3/relations/relation_representer_spec.rb@@ -31,8 +31,8 @@ require 'spec_helper'describe ::API::V3::Relations::RelationRepresenter dolet(:user) { FactoryBot.build_stubbed(:admin) }- let(:from) { FactoryBot.build_stubbed :work_package }- let(:to) { FactoryBot.build_stubbed :work_package }+ let(:from) { FactoryBot.build_stubbed(:stubbed_work_package) }+ let(:to) { FactoryBot.build_stubbed :stubbed_work_package }let(:type) { "follows" }let(:description) { "This first" }@@ -90,11 +90,11 @@ describe ::API::V3::Relations::RelationRepresenter doendit 'deserializes the relation correctly' do- rep = ::API::V3::Relations::RelationRepresenter.new Relation.new, current_user: user+ rep = ::API::V3::Relations::RelationRepresenter.new OpenStruct.new, current_user: userrel = rep.from_json result.except(:id).to_json- expect(rel.from).to eq from- expect(rel.to).to eq to+ expect(rel.from_id).to eq from.id.to_s+ expect(rel.to_id).to eq to.id.to_sexpect(rel.delay).to eq delayexpect(rel.relation_type).to eq typeexpect(rel.description).to eq description