FIX: Do not validate messages sent to mailing list mirror

This commit is contained in:
Gerhard Schlager 2018-01-04 13:39:29 +01:00
parent e0d73a957d
commit f086d28b30
2 changed files with 22 additions and 0 deletions

View File

@ -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)

View File

@ -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!