Testing mailer, up to 99.46%
This commit is contained in:
parent
130558e2be
commit
e83f171785
@ -2,7 +2,5 @@ require 'spec_helper'
|
||||
|
||||
describe ApplicationController do
|
||||
|
||||
it "can fail login"
|
||||
it "can login with HTTP_AUTHORIZATION"
|
||||
|
||||
end
|
@ -1,5 +1,21 @@
|
||||
require "spec_helper"
|
||||
require "ostruct"
|
||||
|
||||
describe VideolistingMailer do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
it 'sends an email' do
|
||||
fake_listing = OpenStruct.new
|
||||
campaign = OpenStruct.new
|
||||
campaign.vpa = "John Doe"
|
||||
campaign.vpa_email = "john@doe.com"
|
||||
campaign.listingcode = "fakelisting"
|
||||
|
||||
fake_listing.campaign = campaign
|
||||
fake_listing.videocode = "fakelisting-1"
|
||||
|
||||
|
||||
videolisting_mail = VideolistingMailer.videolisting_complete(fake_listing).deliver
|
||||
|
||||
expect(videolisting_mail.to).to include("john@doe.com")
|
||||
expect(ActionMailer::Base.deliveries.empty?).to eq(false)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user