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

stabilize flickering spec

ulferts46b0e7be320c
diff --git a/spec/requests/api/v3/relations/relations_api_spec.rb b/spec/requests/api/v3/relations/relations_api_spec.rb
index 59717e7f950..7d8551dc8fb 100644
--- a/spec/requests/api/v3/relations/relations_api_spec.rb
+++ b/spec/requests/api/v3/relations/relations_api_spec.rb
@@ -508,8 +508,17 @@ describe 'API v3 Relation resource', type: :request, content_type: :json do
end
it 'returns the relation' do
+ # Creation leads to journal creation which leads to touching the work package which is not
+ # reflected in the value returned from the wp factory.
+ from.reload
+ to.reload
+
+ expected = API::V3::Relations::RelationRepresenter.new(relation,
+ current_user: current_user,
+ embed_links: true).to_json
+
expect(last_response.body)
- .to be_json_eql API::V3::Relations::RelationRepresenter.new(relation, current_user: current_user, embed_links: true).to_json
+ .to be_json_eql expected
end
end