Skip to content

Commit

Permalink
Reply To Spec Green
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoerlich committed Mar 31, 2016
1 parent d08ecf5 commit a2304e3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/reply_to_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'spec_helper'

describe SparkPostRails::DeliveryMethod do

before(:each) do
@delivery_method = SparkPostRails::DeliveryMethod.new
end

context "Reply To" do
it "handles supplied value" do
test_email = Mailer.test_email reply_to: "[email protected]"
@delivery_method.deliver!(test_email)

expect(@delivery_method.data[:content][:reply_to]).to eq("[email protected]")
end

it "handles no value supplied" do
test_email = Mailer.test_email
@delivery_method.deliver!(test_email)

expect(@delivery_method.data[:content].has_key?(:reply_to)).to eq(false)
end
end
end

0 comments on commit a2304e3

Please sign in to comment.