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

Fix flaky test

Christophe Bliard556f2d57da30
diff --git a/spec/models/activities/fetcher_integration_spec.rb b/spec/models/activities/fetcher_integration_spec.rb
index 3035285a08d..ebfad102964 100644
--- a/spec/models/activities/fetcher_integration_spec.rb
+++ b/spec/models/activities/fetcher_integration_spec.rb
@@ -206,7 +206,7 @@ describe Activities::Fetcher, 'integration' do
# project attributes and news only require the user to be member
expect(subject.map(&:journable_id))
.to match_array([project.id, subproject.id, news.id, subproject_news.id, work_package.id])
- expect(subject.map(&:journable_id))
+ expect(subject.filter { |e| e.event_type.starts_with?('work_package') }.map(&:journable_id))
.not_to include(subproject_work_package.id)
end
end