Sha256: e47baffcb33ac6768d4ffaa0a6f3fa0bacfcaf4a3f9111dc5571bd179c178cbf

Contents?: true

Size: 640 Bytes

Versions: 6

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'
require 'email_spec'

describe Spree::TestMailer, :type => :mailer do
  include EmailSpec::Helpers
  include EmailSpec::Matchers

  before { create(:store) }

  let(:user) { create(:user) }

  context ":from not set explicitly" do
    it "falls back to spree config" do
      message = Spree::TestMailer.test_email('test@example.com')
      expect(message.from).to eq([Spree::Store.current.mail_from_address])
    end
  end

  it "confirm_email accepts a user id as an alternative to a User object" do
    expect {
      test_email = Spree::TestMailer.test_email('test@example.com')
    }.not_to raise_error
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_core-3.0.10 spec/mailers/test_mailer_spec.rb
spree_core-3.0.9 spec/mailers/test_mailer_spec.rb
spree_core-3.0.8 spec/mailers/test_mailer_spec.rb
spree_core-3.0.7 spec/mailers/test_mailer_spec.rb
spree_core-3.0.6.1 spec/mailers/test_mailer_spec.rb
spree_core-3.0.6 spec/mailers/test_mailer_spec.rb