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

More robust way of getting monday of current week

Christophe Bliard6f5675158dcd
diff --git a/modules/calendar/spec/features/calendar_user_interaction_spec.rb b/modules/calendar/spec/features/calendar_user_interaction_spec.rb
index 01aed4883c4..965cc6d67b3 100644
--- a/modules/calendar/spec/features/calendar_user_interaction_spec.rb
+++ b/modules/calendar/spec/features/calendar_user_interaction_spec.rb
@@ -34,7 +34,7 @@ RSpec.describe "Calendar drag&dop and resizing",
:selenium do
include_context "with calendar full access"
- shared_let(:monday) { Time.zone.today.beginning_of_week }
+ shared_let(:monday) { Date.current.beginning_of_week(:monday) }
shared_let(:tuesday) { monday + 1.day }
shared_let(:wednesday) { monday + 2.days }
shared_let(:thursday) { monday + 3.days }