FIX: Do not validate messages sent to mailing list mirror
This commit is contained in:
parent
e0d73a957d
commit
f086d28b30
|
@ -818,6 +818,16 @@ describe Email::Receiver do
|
|||
expect { process(:mailinglist_reply) }.to change { topic.posts.count }
|
||||
end
|
||||
|
||||
it "should skip validations for staged users" do
|
||||
Fabricate(:user, email: "alice@foo.com", staged: true)
|
||||
expect { process(:mailinglist_short_message) }.to change { Topic.count }
|
||||
end
|
||||
|
||||
it "should skip validations for regular users" do
|
||||
Fabricate(:user, email: "alice@foo.com")
|
||||
expect { process(:mailinglist_short_message) }.to change { Topic.count }
|
||||
end
|
||||
|
||||
context "read-only category" do
|
||||
before do
|
||||
category.set_permissions(everyone: :readonly)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
From: alice@foo.com
|
||||
To: list@example.com
|
||||
Subject: test
|
||||
Date: Mon, 16 Oct 2017 09:18:32 +0100
|
||||
Message-ID: <bddaa334ef93b5f3c7c3a42599330844@foo.com>
|
||||
Precedence: list
|
||||
List-Id: Example List <list@example.com>
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: list-bounces@example.com
|
||||
|
||||
Hello world!
|
Loading…
Reference in New Issue