Sha256: 62c8ca4ed0c4b8caa14f1d0f18179e5212ec9d42c20f7c41c0f86f24436fa299
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
describe StatusCat::StatusMailer do it 'adds StatusCat::StatusHelper as a template helper' do modules = StatusCat::StatusMailer._helpers.included_modules expect( modules ).to include( StatusCat::StatusHelper ) end describe '#failure' do let( :mail ) { StatusCat::StatusMailer.failure( StatusCat::Status.all ) } let( :config ) { StatusCat.config } it 'uses the configured from address' do expect( mail.from ).to_not be_nil expect( mail.from ).to eql( [ config.from ] ) end it 'uses the configured to address' do expect( mail.to ).to_not be_nil expect( mail.to ).to eql( [ config.to ] ) end it 'uses the configured subject' do expect( mail.subject ).to_not be_nil expect( mail.subject ).to eql( config.subject ) end it 'generates a multipart email with both text and html' do expect( mail.parts.first.content_type ).to eql( 'text/plain; charset=UTF-8' ) expect( mail.parts.second.content_type ).to eql( 'text/html; charset=UTF-8' ) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
status_cat-0.1.1 | spec/mailers/status_cat/status_mailer_spec.rb |