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
Use tomorrow, not today as start for update_service_integration_spec
Oliver Günther7532b63818cc
diff --git a/modules/meeting/spec/services/recurring_meetings/update_service_integration_spec.rb b/modules/meeting/spec/services/recurring_meetings/update_service_integration_spec.rbindex d805a948a70..dd13d759cf6 100644--- a/modules/meeting/spec/services/recurring_meetings/update_service_integration_spec.rb+++ b/modules/meeting/spec/services/recurring_meetings/update_service_integration_spec.rb@@ -38,7 +38,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model doshared_let(:series, refind: true) docreate(:recurring_meeting,project:,- start_time: Time.zone.today + 10.hours,+ start_time: Time.zone.tomorrow + 10.hours,frequency: "daily",interval: 1,end_after: "specific_date",@@ -56,17 +56,17 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model docreate(:scheduled_meeting,:cancelled,recurring_meeting: series,- start_time: Time.zone.today + 1.day + 10.hours)+ start_time: Time.zone.tomorrow + 1.day + 10.hours)endcontext "when updating the start_date to the time of the first cancellation" dolet(:params) do- { start_date: Time.zone.today + 1.day }+ { start_date: Time.zone.tomorrow + 1.day }endit "removes the cancelled occurrence" doexpect(service_result).to be_success- expect(updated_meeting.start_time).to eq(Time.zone.today + 1.day + 10.hours)+ expect(updated_meeting.start_time).to eq(Time.zone.tomorrow + 1.day + 10.hours)expect { scheduled_meeting.reload }.to raise_error(ActiveRecord::RecordNotFound)end@@ -81,7 +81,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model doexpect(service_result).to be_successscheduled_meeting.reload- expect(scheduled_meeting.start_time).to eq(Time.zone.today + 1.day + 9.hours)+ expect(scheduled_meeting.start_time).to eq(Time.zone.tomorrow + 1.day + 9.hours)endend@@ -211,7 +211,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model do# Verify each scheduled meeting is moved to weekly intervalsscheduled_meetings.each_with_index do |meeting, index|meeting.reload- expect(meeting.start_time).to eq(Time.zone.today + ((index + 1) * 7).days + 10.hours)+ expect(meeting.start_time).to eq(Time.zone.tomorrow + (index * 7).days + 10.hours)endend@@ -237,7 +237,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model docreate(:scheduled_meeting,:persisted,recurring_meeting: series,- start_time: Time.zone.today + (i + 1).days + 10.hours)+ start_time: Time.zone.tomorrow + i.days + 10.hours)endend@@ -245,7 +245,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model dolet(:params) do{end_after: "iterations",- iterations: 2+ iterations: 1}end@@ -270,7 +270,7 @@ RSpec.describe RecurringMeetings::UpdateService, "integration", type: :model do# Verify each scheduled meeting is moved to weekly intervalsscheduled_meetings.each_with_index do |meeting, index|meeting.reload- expect(meeting.start_time).to eq(Time.zone.today + ((index + 1) * 2).days + 10.hours)+ expect(meeting.start_time).to eq(Time.zone.tomorrow + (index * 2).days + 10.hours)endendend