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
Replace all option in parsing representer with 'real' setting
Oliver Günther2d6289d8a79e
diff --git a/app/models/notifications/scopes/mail_alert_unsent.rb b/app/models/notifications/scopes/mail_alert_unsent.rbindex 277d014b50e..51289e81d3c 100644--- a/app/models/notifications/scopes/mail_alert_unsent.rb+++ b/app/models/notifications/scopes/mail_alert_unsent.rb@@ -35,7 +35,7 @@ module Notifications::Scopesclass_methods dodef mail_alert_unsent- where(mail_alert_unsent: false)+ where(mail_alert_sent: false)endendenddiff --git a/modules/documents/spec/services/notifications/create_from_model_service_document_spec.rb b/modules/documents/spec/services/notifications/create_from_model_service_document_spec.rbindex 20450e8d44d..42b624c9840 100644--- a/modules/documents/spec/services/notifications/create_from_model_service_document_spec.rb+++ b/modules/documents/spec/services/notifications/create_from_model_service_document_spec.rb@@ -72,7 +72,7 @@ describe Notifications::CreateFromModelService, 'document', with_settings: { joucontext 'with the user having registered for involved notifications' dolet(:recipient_notification_settings) do[- FactoryBot.build(:notification_setting, **notification_settings_all_false.merge(involved: true)),+ FactoryBot.build(:notification_setting, **notification_settings_all_false.merge(involved: true))]end@@ -82,7 +82,7 @@ describe Notifications::CreateFromModelService, 'document', with_settings: { joucontext 'with the user having registered for no notifications' dolet(:recipient_notification_settings) do[- FactoryBot.build(:notification_setting, **notification_settings_all_false),+ FactoryBot.build(:notification_setting, **notification_settings_all_false)]enddiff --git a/spec/lib/api/v3/user_preferences/user_preference_representer_parsing_spec.rb b/spec/lib/api/v3/user_preferences/user_preference_representer_parsing_spec.rbindex 0ae8f7210df..62723c2164f 100644--- a/spec/lib/api/v3/user_preferences/user_preference_representer_parsing_spec.rb+++ b/spec/lib/api/v3/user_preferences/user_preference_representer_parsing_spec.rb@@ -43,7 +43,7 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter,{'notifications' => [{- 'all' => true,+ 'involved' => true,'_links' => {'project' => {'href' => '/api/v3/projects/1'@@ -51,7 +51,7 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter,}},{- 'all' => false,+ 'involved' => false,'mentioned' => true,'_links' => {'project' => {@@ -69,10 +69,11 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter,in_project, global = subject.notification_settingsexpect(in_project[:project_id]).to eq "1"- expect(in_project[:all]).to be_truthy+ expect(in_project[:involved]).to be_truthy+ expect(in_project[:mentioned]).to be_nilexpect(global[:project_id]).to eq nil- expect(global[:all]).to eq false+ expect(global[:involved]).to eq falseexpect(global[:mentioned]).to eq trueendenddiff --git a/spec/models/notifications/scopes/reminder_mail_unsent.rb b/spec/models/notifications/scopes/reminder_mail_unsent_spec.rbsimilarity index 100%rename from spec/models/notifications/scopes/reminder_mail_unsent.rbrename to spec/models/notifications/scopes/reminder_mail_unsent_spec.rbdiff --git a/spec/services/notifications/create_from_model_service_work_package_spec.rb b/spec/services/notifications/create_from_model_service_work_package_spec.rbindex 1aa3cf48fba..4361805b3d5 100644--- a/spec/services/notifications/create_from_model_service_work_package_spec.rb+++ b/spec/services/notifications/create_from_model_service_work_package_spec.rb@@ -299,7 +299,7 @@ describe Notifications::CreateFromModelService,let(:user_property) { :watcher }let(:recipient_notification_settings) do[- FactoryBot.build(:notification_setting, **notification_settings_all_true),+ FactoryBot.build(:notification_setting, **notification_settings_all_true)]end