Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/email/receiver_spec.rb')
-rw-r--r--spec/lib/gitlab/email/receiver_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/email/receiver_spec.rb b/spec/lib/gitlab/email/receiver_spec.rb
index af44c1242ed..1cc80f35f98 100644
--- a/spec/lib/gitlab/email/receiver_spec.rb
+++ b/spec/lib/gitlab/email/receiver_spec.rb
@@ -58,6 +58,16 @@ describe Gitlab::Email::Receiver do
end
end
+ context "when the user has been blocked" do
+ before do
+ user.block
+ end
+
+ it "raises a UserBlockedError" do
+ expect { receiver.execute }.to raise_error(Gitlab::Email::Receiver::UserBlockedError)
+ end
+ end
+
context "when the user is not authorized to create a note" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)