mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #2647 from riking/multiple-addresses
Allow processing of email sent to multiple addresses
This commit is contained in:
@@ -167,8 +167,21 @@ describe Jobs::PollMailbox do
|
||||
email.should be_deleted
|
||||
end
|
||||
|
||||
it "works with multiple To addresses" do
|
||||
email = MockPop3EmailObject.new fixture_file('emails/multiple_destinations.eml')
|
||||
expect_success
|
||||
|
||||
poller.handle_mail(email)
|
||||
|
||||
new_post = Post.find_by(topic: topic, post_number: 2)
|
||||
assert new_post.present?
|
||||
assert_equal expected_post.strip, new_post.cooked.strip
|
||||
|
||||
email.should be_deleted
|
||||
end
|
||||
|
||||
describe "with the wrong reply key" do
|
||||
let(:email) { MockPop3EmailObject.new fixture_file('emails/wrong_reply_key.eml')}
|
||||
let(:email) { MockPop3EmailObject.new fixture_file('emails/wrong_reply_key.eml') }
|
||||
|
||||
it "raises an EmailLogNotFound error" do
|
||||
expect_exception Email::Receiver::EmailLogNotFound
|
||||
|
||||
Reference in New Issue
Block a user