Testing mailer, up to 99.46%

This commit is contained in:
Tyrel Souza 2014-05-06 15:45:50 -04:00
parent 130558e2be
commit e83f171785
2 changed files with 17 additions and 3 deletions

View File

@ -2,7 +2,5 @@ require 'spec_helper'
describe ApplicationController do
it "can fail login"
it "can login with HTTP_AUTHORIZATION"
end

View File

@ -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