correct specs

This commit is contained in:
Sam 2018-08-27 14:50:56 +10:00
parent fb0b54f7f8
commit dc17ae3b2f

View File

@ -146,6 +146,9 @@ describe TopicCreator do
end end
it "should be possible for a trusted user to send private messages via email" do it "should be possible for a trusted user to send private messages via email" do
SiteSetting.manual_polling_enabled = true
SiteSetting.reply_by_email_address = "sam+%{reply_key}@sam.com"
SiteSetting.reply_by_email_enabled = true
SiteSetting.enable_personal_email_messages = true SiteSetting.enable_personal_email_messages = true
SiteSetting.min_trust_to_send_email_messages = TrustLevel[1] SiteSetting.min_trust_to_send_email_messages = TrustLevel[1]
@ -155,6 +158,9 @@ describe TopicCreator do
context 'failure cases' do context 'failure cases' do
it "should be rollback the changes when email is invalid" do it "should be rollback the changes when email is invalid" do
SiteSetting.manual_polling_enabled = true
SiteSetting.reply_by_email_address = "sam+%{reply_key}@sam.com"
SiteSetting.reply_by_email_enabled = true
SiteSetting.enable_personal_email_messages = true SiteSetting.enable_personal_email_messages = true
SiteSetting.min_trust_to_send_email_messages = TrustLevel[1] SiteSetting.min_trust_to_send_email_messages = TrustLevel[1]
attrs = pm_to_email_valid_attrs.dup attrs = pm_to_email_valid_attrs.dup