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 more tests
Christophe Bliard8efd96f7608b
diff --git a/spec/workers/notifications/create_date_alerts_notifications_job/alertable_work_packages_spec.rb b/spec/workers/notifications/create_date_alerts_notifications_job/alertable_work_packages_spec.rbindex 0d24858929d..1a66f13632a 100644--- a/spec/workers/notifications/create_date_alerts_notifications_job/alertable_work_packages_spec.rb+++ b/spec/workers/notifications/create_date_alerts_notifications_job/alertable_work_packages_spec.rb@@ -332,6 +332,8 @@ RSpec.describe Notifications::CreateDateAlertsNotificationsJob::AlertableWorkPacinclude_examples 'not alertable if due', days_ago: 2include_examples 'not alertable if due', days_ago: 3include_examples 'alertable if due', days_ago: 4+ include_examples 'not alertable if due', days_ago: 5+ include_examples 'not alertable if due', days_ago: 6include_examples 'alertable if due', days_ago: 7end@@ -347,6 +349,7 @@ RSpec.describe Notifications::CreateDateAlertsNotificationsJob::AlertableWorkPacinclude_examples 'not alertable if due', days_ago: 4include_examples 'not alertable if due', days_ago: 7include_examples 'alertable if due', days_ago: 8+ include_examples 'not alertable if due', days_ago: 12include_examples 'alertable if due', days_ago: 15enddiff --git a/spec/workers/notifications/create_date_alerts_notifications_job_spec.rb b/spec/workers/notifications/create_date_alerts_notifications_job_spec.rbindex 451ae33d0eb..0cd79208c68 100644--- a/spec/workers/notifications/create_date_alerts_notifications_job_spec.rb+++ b/spec/workers/notifications/create_date_alerts_notifications_job_spec.rb@@ -377,5 +377,18 @@ describe Notifications::CreateDateAlertsNotificationsJob, type: :job doexpect(user_paris).not_to have_a_start_date_alert_notification_for(work_package)endend++ context 'when scheduled at 01:00 am Paris local time and executed at 01:37 am' do+ it 'creates a start date alert notification for a user in the same time zone' do+ work_package = alertable_work_package++ set_scheduled_time(timezone_paris.now.change(hour: 1, min: 0))+ travel_to(timezone_paris.now.change(hour: 1, min: 37))++ scheduled_job.invoke_job++ expect(user_paris).to have_a_start_date_alert_notification_for(work_package)+ end+ endendend