Sha256: cf32e3f54a8997ee65dccc2fa4ef52ee83f4066b316b2cb3525933345d8f2a3a
Contents?: true
Size: 1.6 KB
Versions: 13
Compression:
Stored size: 1.6 KB
Contents
# -*- encoding : utf-8 -*- describe Card::Mailer do #include ActionMailer::Quoting before do ActionMailer::Base.deliveries = [] @expected = Mail.new end # ## see notifier test for data used in these tests # FIXME: the cache is not cleared properly between tests. if the order changes # (ie try renamed change notice below to change_notice) then *notify+*from gets stuck on. # context "change notice" do # before do # user = Card['sara'].id # card = Card["Sunglasses"] # action = "edited" # Card::Mailer.change_notice( user, card, action, card.name ).deliver # end # # it "deliver a message" do # assert_equal 1, ActionMailer::Base.deliveries.size # end # # context "change notice message" do # before do # @mail = ActionMailer::Base.deliveries[0] # end # it "is addressed to users email" do # assert_equal ["sara@user.com"], @mail.to # end # it "is from Wag bot email" do # assert_equal [Card[Card::WagnBotID].account.email], @mail.from # end # end # end # # describe "flexmail" do # # FIXME: at least two tests should be here, with & w/o attachment. # end # describe "cardmail" do # before do # Card.gimme "mailtest", :content => "test" # end # it "renders email text" do # Card::Mailer.cardmail(:to => "sara@user.com").deliver # @mail = ActionMailer::Base.deliveries.last # expect(@mail.body).to eq("test") # end # end private def encode(subject) quoted_printable(subject, Card::Mailer::CHARSET) end end
Version data entries
13 entries across 13 versions & 1 rubygems