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.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/email/receiver_spec.rb b/spec/lib/gitlab/email/receiver_spec.rb
index 018219e5647..b764bb39682 100644
--- a/spec/lib/gitlab/email/receiver_spec.rb
+++ b/spec/lib/gitlab/email/receiver_spec.rb
@@ -5,6 +5,14 @@ require 'spec_helper'
describe Gitlab::Email::Receiver do
include_context :email_shared_context
+ shared_examples 'correctly finds the mail key' do
+ specify do
+ expect(Gitlab::Email::Handler).to receive(:for).with(an_instance_of(Mail::Message), 'gitlabhq/gitlabhq+auth_token').and_return(handler)
+
+ receiver.execute
+ end
+ end
+
context 'when the email contains a valid email address in a header' do
let(:handler) { double(:handler) }