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
Add a refresh interval
Klaus Zanders3c78edc58720
diff --git a/modules/meeting/app/services/meetings/icalendar_builder.rb b/modules/meeting/app/services/meetings/icalendar_builder.rbindex 307561545eb..b9ff20242f6 100644--- a/modules/meeting/app/services/meetings/icalendar_builder.rb+++ b/modules/meeting/app/services/meetings/icalendar_builder.rb@@ -198,6 +198,7 @@ module Meetingsdef build_icalendar::Icalendar::Calendar.new.tap do |calendar|calendar.prodid = "-//OpenProject GmbH//#{OpenProject::VERSION}//Meeting//EN"+ calendar.refresh_interval = "PT6H"endenddiff --git a/modules/meeting/spec/services/meetings/icalendar_builder_spec.rb b/modules/meeting/spec/services/meetings/icalendar_builder_spec.rbindex 8df05d49561..a79d68a5096 100644--- a/modules/meeting/spec/services/meetings/icalendar_builder_spec.rb+++ b/modules/meeting/spec/services/meetings/icalendar_builder_spec.rb@@ -34,19 +34,24 @@ RSpec.describe Meetings::IcalendarBuilder,with_settings: { mail_from: "[email protected]", app_title: "OpenProject Testing" } dolet(:timezone) { ActiveSupport::TimeZone["Europe/Berlin"] }- it "sets the PRODID parameter to the correct value" do- builder = described_class.new(timezone:)+ context "without any meetings" do+ subject(:builder) { described_class.new(timezone:) }- calendar = Icalendar::Calendar.parse(builder.to_ical).first- expect(calendar.prodid).to eq("-//OpenProject GmbH//#{OpenProject::VERSION}//Meeting//EN")- end+ let(:parsed_calendar) { Icalendar::Calendar.parse(builder.to_ical).first }- it "allows setting a custom calendar title" do- builder = described_class.new(timezone:)- builder.calendar_title = "Custom Title"+ it "sets the calendar properties" do+ expect(parsed_calendar.prodid).to eq("-//OpenProject GmbH//#{OpenProject::VERSION}//Meeting//EN")+ expect(parsed_calendar.version).to eq("2.0")+ expect(parsed_calendar.calscale).to eq("GREGORIAN")+ expect(parsed_calendar.refresh_interval.value_ical).to eq("PT6H")+ end++ it "allows setting a custom calendar title" do+ builder.calendar_title = "Custom Title"- calendar = Icalendar::Calendar.parse(builder.to_ical).first- expect(calendar.x_wr_calname.first).to eq("Custom Title")+ calendar = Icalendar::Calendar.parse(builder.to_ical).first+ expect(calendar.x_wr_calname.first).to eq("Custom Title")+ endendcontext "with a single meeting" do