mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: don't process the same incoming email more than once
This commit is contained in:
parent
13e489b4ca
commit
4fb335f1f0
2 changed files with 18 additions and 9 deletions
|
@ -160,6 +160,13 @@ describe Email::Receiver do
|
|||
expect(topic.posts.last.raw).to eq("This is a **HTML** reply ;)")
|
||||
end
|
||||
|
||||
it "doesn't process email with same message-id more than once" do
|
||||
expect do
|
||||
process(:text_reply)
|
||||
process(:text_reply)
|
||||
end.to change { topic.posts.count }.by(1)
|
||||
end
|
||||
|
||||
it "handles different encodings correctly" do
|
||||
expect { process(:hebrew_reply) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to eq("שלום! מה שלומך היום?")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue