<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -149,6 +149,24 @@ describe Mail do
     @mail.send.should be_false
     @mail.errors['base'].should == &quot;Boom!&quot;
   end
+  
+  it &quot;should set the Reply-To header on the sent mail to the reply_to value given in the configuration&quot; do
+    @mail.config[:reply_to] = &quot;reply_to@example.com&quot;
+    @mail.send
+    ActionMailer::Base.deliveries.last.reply_to.should == [@mail.config[:reply_to]] # reply_to on TMail is an Array
+  end
+
+  it &quot;should set the Reply-To header on the sent mail to the reply_to_field data value given in the configuration&quot; do
+    @mail.config[:reply_to_field] = 'email'
+    @mail.data['email'] = 'reply_to_field@example.com'
+    @mail.send
+    ActionMailer::Base.deliveries.last.reply_to.should == [@mail.data['email']] # reply_to on TMail is an Array
+  end
+
+  it &quot;should set the Reply-To header on the sent mail to the from value when the configuration does not specify a reply_to&quot; do
+    @mail.send
+    ActionMailer::Base.deliveries.last.reply_to.should == ['foo@baz.com'] # reply_to on TMail is an Array
+  end
 
   describe &quot;when the page has no email body specified&quot; do
     it &quot;should render the submitted data as YAML to the plain body&quot; do</diff>
      <filename>spec/models/mail_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>10c198c9d9e0952b86922c37ad553b0cbfb69ec4</id>
    </parent>
  </parents>
  <author>
    <name>Michael Klett</name>
    <email>michael@webadvocate.com</email>
  </author>
  <url>http://github.com/radiant/radiant-mailer-extension/commit/9a1c9a31ef5fe8b67dfc1d542eebf6b71db8c48e</url>
  <id>9a1c9a31ef5fe8b67dfc1d542eebf6b71db8c48e</id>
  <committed-date>2009-02-11T18:33:37-08:00</committed-date>
  <authored-date>2008-12-13T06:51:38-08:00</authored-date>
  <message>Add specs testing the behavior of the Reply-To header on sent mails.

Signed-off-by: Radiant CMS dev team &lt;radiant@prime-motif.com&gt;</message>
  <tree>c5237fc8d3917e9a818455699d807477e787925d</tree>
  <committer>
    <name>Radiant CMS dev team</name>
    <email>radiant@prime-motif.com</email>
  </committer>
</commit>
