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
get the job class name from the class instead of string literal in two places
Ivan Kuchine7b8837ccad5
diff --git a/spec/workers/notifications/schedule_date_alerts_notifications_job_spec.rb b/spec/workers/notifications/schedule_date_alerts_notifications_job_spec.rbindex 6475236eb04..5e9fcc86917 100644--- a/spec/workers/notifications/schedule_date_alerts_notifications_job_spec.rb+++ b/spec/workers/notifications/schedule_date_alerts_notifications_job_spec.rb@@ -92,15 +92,17 @@ RSpec.describe Notifications::ScheduleDateAlertsNotificationsJob, type: :job, wiendshared_examples_for "job execution creates date alerts creation job" do+ let(:job_class) { Notifications::CreateDateAlertsNotificationsJob.name }+it "creates the job for the user" doexpect dorun_job(timezone:, scheduled_at:, local_time:) do- j = GoodJob::Job.where(job_class: "Notifications::CreateDateAlertsNotificationsJob")+ j = GoodJob::Job.where(job_class:).order(created_at: :desc).lastexpect_job(j, user)end- end.to change { GoodJob::Job.where(job_class: "Notifications::CreateDateAlertsNotificationsJob").count }.by 1+ end.to change { GoodJob::Job.where(job_class:).count }.by 1endend