Sha256: 8f032e6b2adbb73ebf0fd15ba762c14410803b7996936834ea5b837bb880db05

Contents?: true

Size: 1.14 KB

Versions: 5

Compression:

Stored size: 1.14 KB

Contents

require "rails_helper"

RSpec.describe NotifyOn::NotificationMailer, :type => :mailer do

  # describe 'message notifications on create' do
  #   it 'can be overridden with a customized view' do
  #     message = create(:message)
  #     n = first_notification
  #     mail = NotifyOn::NotificationMailer.notify(n.id, 'new_message')
  #     expect(mail.to).to eq([message.user.email])
  #     expect(mail.from).to eq([message.author.email])
  #     expect(mail.body.encoded)
  #       .to include("#{message.author.to_s} sent you a message:")
  #   end
  #   it 'will use a custom mailer if configured to do so' do
  #     # Note: We're setting this on the fly instead of overriding throughout the
  #     # dummy app.
  #     NotifyOn.configure { |config| config.mailer_class = 'NotificationMailer' }
  #     message = create(:message)
  #     mail = emails[0]
  #     # We only change one iteme in this mailer -- just enough to show us we're
  #     # using the correct one.
  #     expect(mail.from).to eq(['admin@bobross.com'])
  #     NotifyOn.configure do |config|
  #       config.mailer_class = 'NotifyOn::NotificationMailer'
  #     end
  #   end
  # end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
notify_on-1.0.5 spec/dummy/spec/mailers/notify_on/notification_mailer_spec.rb
notify_on-1.0.4 spec/dummy/spec/mailers/notify_on/notification_mailer_spec.rb
notify_on-1.0.3 spec/dummy/spec/mailers/notify_on/notification_mailer_spec.rb
notify_on-1.0.2 spec/dummy/spec/mailers/notify_on/notification_mailer_spec.rb
notify_on-1.0.1 spec/dummy/spec/mailers/notify_on/notification_mailer_spec.rb