@ -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?
@ -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
@ -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,