2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FIX: support incoming emails with no subject

This commit is contained in:
Régis Hanol 2016-02-01 12:16:15 +01:00
parent 904e532439
commit 49d1f88f6e
4 changed files with 27 additions and 4 deletions

View file

@ -219,6 +219,7 @@ describe Email::Receiver do
expect { process(:encoded_display_name) }.to change(Topic, :count)
topic = Topic.last
expect(topic.title).to eq("I need help")
expect(topic.private_message?).to eq(true)
expect(topic.allowed_groups).to include(group)
@ -228,6 +229,11 @@ describe Email::Receiver do
expect(user.name).to eq("Случайная Имя")
end
it "handles email with no subject" do
expect { process(:no_subject) }.to change(Topic, :count)
expect(Topic.last.title).to eq("Incoming email from some@one.com")
end
it "invites everyone in the chain but emails configured as 'incoming' (via reply, group or category)" do
expect { process(:cc) }.to change(Topic, :count)
emails = Topic.last.allowed_users.pluck(:email)