Sha256: 4c8df7dc5061b7943055732ee622b449d23e043646e09871b708c0cf95a5843a

Contents?: true

Size: 776 Bytes

Versions: 5

Compression:

Stored size: 776 Bytes

Contents

require 'rails_helper'

describe ApplicationMailer do
  it 'sets the correct subject' do
    subject = 'Test email subject'
    mail = described_class.email('test@example.com',
                                 subject, 'Test email body')

    expect(mail.subject).to eq(subject)
  end

  it 'includes content in the body of the email' do
    body = 'Test email body'
    mail = described_class.email('test@example.com',
                                 'Test email subject', body)

    expect(mail.body).to eq(body)
  end

  it 'sends from no-reply@<%= app_name %>.com' do
    mail = described_class.email('test@example.com',
                                 'Test email subject', 'Test email body')

    expect(mail.from).to include('no-reply@<%= app_name %>.com')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
voyage-1.44.0.14 lib/voyage/templates/specs/mailers/application_mailer_spec.rb.erb
voyage-1.44.0.13 lib/voyage/templates/specs/mailers/application_mailer_spec.rb.erb
voyage-1.44.0.11 lib/voyage/templates/specs/mailers/application_mailer_spec.rb.erb
voyage-1.44.0.12 lib/voyage/templates/specs/mailers/application_mailer_spec.rb.erb
voyage-1.44.0.10 lib/voyage/templates/specs/mailers/application_mailer_spec.rb.erb