Sha256: 5c5591a2aeb93f9be93583cfd5c8a80303258f565165cc1b7cd927db61d61a35
Contents?: true
Size: 928 Bytes
Versions: 21
Compression:
Stored size: 928 Bytes
Contents
# -*- encoding : utf-8 -*- require "card/mailer" describe Card::Set::Type::EmailTemplate do describe "view :mail" do let(:content_type) do Card::Auth.current_id = Card::WagnBotID card = Card.create!(name: "content type test", type: :email_template, subcards: @fields) email = card.format.render_mail email[:content_type].value end it "renders text email if text message given" do @fields = { "+*text_message" => "text" } expect(content_type).to include "text/plain" end it "renders html email if html message given" do @fields = { "+*html_message" => "text" } expect(content_type).to include "text/html" end it "renders multipart email if text and html given" do @fields = { "+*text_message" => "text", "+*html_message" => "text" } expect(content_type).to include "multipart/alternative" end end end
Version data entries
21 entries across 21 versions & 1 rubygems