|
8 | 8 | described_class.new( |
9 | 9 | from: from, |
10 | 10 | to: to, |
| 11 | + reply_to: reply_to, |
11 | 12 | cc: cc, |
12 | 13 | bcc: bcc, |
13 | 14 | subject: mail_subject, |
|
22 | 23 |
|
23 | 24 | let(:from) { nil } |
24 | 25 | let(:to) { [] } |
| 26 | + let(:reply_to) { nil } |
25 | 27 | let(:cc) { [] } |
26 | 28 | let(:bcc) { [] } |
27 | 29 | let(:mail_subject) { nil } |
|
80 | 82 | end |
81 | 83 |
|
82 | 84 | context 'when all values set' do |
| 85 | + let(:reply_to) { { email: 'reply-to@railsware.com' } } |
83 | 86 | let(:cc) { [{ email: 'cc@example.com' }] } |
84 | 87 | let(:bcc) { [{ email: 'bcc@example.com' }] } |
85 | 88 | let(:html) { '<div>Test HTML</div>' } |
|
91 | 94 | { |
92 | 95 | 'from' => { email: 'test@example.com', name: 'Mailtrap User' }, |
93 | 96 | 'to' => [{ email: 'to@example.com' }, { email: 'to2@example.com', name: 'To Two' }], |
| 97 | + 'reply_to' => { email: 'reply-to@railsware.com' }, |
94 | 98 | 'cc' => [{ email: 'cc@example.com' }], |
95 | 99 | 'bcc' => [{ email: 'bcc@example.com' }], |
96 | 100 | 'subject' => 'This is subject', |
|
114 | 118 |
|
115 | 119 | let(:from) { { email: 'test@example.com', name: 'Mailtrap User' } } |
116 | 120 | let(:to) { [{ email: 'to@example.com' }, { email: 'to2@example.com', name: 'To Two' }] } |
| 121 | + let(:reply_to) { { email: 'reply-to@railsware.com', name: 'Reply To' } } |
117 | 122 | let(:mail_subject) { 'This is subject' } |
118 | 123 | let(:text) { 'This is text' } |
119 | 124 | let(:cc) { [{ email: 'cc@example.com' }] } |
|
126 | 131 | '{' \ |
127 | 132 | '"from":{"email":"test@example.com","name":"Mailtrap User"},' \ |
128 | 133 | '"to":[{"email":"to@example.com"},{"email":"to2@example.com","name":"To Two"}],' \ |
| 134 | + '"reply_to":{"email":"reply-to@railsware.com","name":"Reply To"},' \ |
129 | 135 | '"cc":[{"email":"cc@example.com"}],' \ |
130 | 136 | '"bcc":[{"email":"bcc@example.com"}],' \ |
131 | 137 | '"subject":"This is subject",' \ |
|
0 commit comments