diff --git a/app/models/journal_listener.rb b/app/models/journal_notification_mailer.rb similarity index 98% rename from app/models/journal_listener.rb rename to app/models/journal_notification_mailer.rb index c184578ce8..54a96352de 100644 --- a/app/models/journal_listener.rb +++ b/app/models/journal_notification_mailer.rb @@ -27,7 +27,7 @@ # See doc/COPYRIGHT.rdoc for more details. #++ -class JournalListener +class JournalNotificationMailer class << self def distinguish_journals(journal, send_notification) if journal.journable_type == 'WorkPackage' && send_notification && journal.initial? diff --git a/config/initializers/require_listeners.rb b/config/initializers/require_listeners.rb index aff1d60fab..d60b8fee8b 100644 --- a/config/initializers/require_listeners.rb +++ b/config/initializers/require_listeners.rb @@ -28,5 +28,5 @@ #++ OpenProject::Notifications.subscribe('journal_created') do |payload| - JournalListener.distinguish_journals(payload[:journal], payload[:send_notification]) + JournalNotificationMailer.distinguish_journals(payload[:journal], payload[:send_notification]) end diff --git a/spec/legacy/unit/journal_observer_spec.rb b/spec/legacy/unit/journal_notification_mailer_spec.rb similarity index 98% rename from spec/legacy/unit/journal_observer_spec.rb rename to spec/legacy/unit/journal_notification_mailer_spec.rb index 66c13a7011..9b0bab99cc 100644 --- a/spec/legacy/unit/journal_observer_spec.rb +++ b/spec/legacy/unit/journal_notification_mailer_spec.rb @@ -28,7 +28,7 @@ #++ require 'legacy_spec_helper' -describe JournalListener, type: :model do +describe JournalNotificationMailer, type: :model do before do @type = FactoryGirl.create :type_with_workflow @project = FactoryGirl.create :project,