Sha256: 1ff9514d956628a30f6730c47cb7132f8f7a1151b8e09ed968ad186cb50f1544
Contents?: true
Size: 994 Bytes
Versions: 30
Compression:
Stored size: 994 Bytes
Contents
require 'rails_helper' describe "CamaleonCms::HtmlMailer" do before(:each) do @site = create(:site).decorate end describe 'empty content' do let(:mail) { CamaleonCms::HtmlMailer.sender('test@gmail.com', "test") } it 'renders the subject' do expect(mail.subject).to eql('test') end it 'renders the receiver email' do expect(mail.to).to eql(['test@gmail.com']) end it 'renders the sender email' do expect(mail.from).to eql(['owenperedo@gmail.com']) end it 'html layout text' do expect(mail.body.encoded).to match('Visit Site') end end describe 'custom content' do let(:mail) { CamaleonCms::HtmlMailer.sender('test@gmail.com', "test", content: 'custom content', cc_to: ['a@gmail.com', 'b@gmail.com']) } it 'renders the sender email' do expect(mail.cc).to eql(['a@gmail.com', 'b@gmail.com']) end it 'custom content' do expect(mail.body.encoded).to match('custom content') end end end
Version data entries
30 entries across 30 versions & 2 rubygems