mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 06:09:15 +08:00
FIX: Force enable user PM emails option when user posts to a group by email.
This commit is contained in:

committed by
Guo Xiang Tan

parent
d9bea66365
commit
da9eee5262
@ -609,6 +609,14 @@ describe Email::Receiver do
|
||||
expect(Post.last.raw).to match(/discourse\.rb/)
|
||||
end
|
||||
|
||||
it "enables user's email_private_messages option when user emails group" do
|
||||
user = Fabricate(:user, email: "existing@bar.com")
|
||||
user.user_option.update_columns(email_private_messages: false)
|
||||
expect { process(:group_existing_user) }.to change(Topic, :count)
|
||||
user.reload
|
||||
expect(user.user_option.email_private_messages).to eq(true)
|
||||
end
|
||||
|
||||
context "with forwarded emails enabled" do
|
||||
before { SiteSetting.enable_forwarded_emails = true }
|
||||
|
||||
|
Reference in New Issue
Block a user