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:
authorMichael Kozono <mkozono@gmail.com>2018-04-09 23:30:43 +0300
committerMichael Kozono <mkozono@gmail.com>2018-04-11 03:40:33 +0300
commite67759bbc911a453d47e6d3afab8ad1de51bf1ce (patch)
tree763dd2a5941b601da960b0dcaf8eddb62c4bff4b /spec/lib/gitlab/email
parent37a5632483b67ddcfa4c535cc911319b25f01fb5 (diff)
Fix email handler spec for EE
Diffstat (limited to 'spec/lib/gitlab/email')
-rw-r--r--spec/lib/gitlab/email/handler_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/lib/gitlab/email/handler_spec.rb b/spec/lib/gitlab/email/handler_spec.rb
index 386d73e6115..cedbfcc0d18 100644
--- a/spec/lib/gitlab/email/handler_spec.rb
+++ b/spec/lib/gitlab/email/handler_spec.rb
@@ -25,12 +25,12 @@ describe Gitlab::Email::Handler do
described_class.for('email', address).class
end
- expect(matched_handlers.uniq).to match_array(Gitlab::Email::Handler::HANDLERS)
+ expect(matched_handlers.uniq).to match_array(ce_handlers)
end
it 'can pick exactly one handler for each address' do
addresses.each do |address|
- matched_handlers = Gitlab::Email::Handler::HANDLERS.select do |handler|
+ matched_handlers = ce_handlers.select do |handler|
handler.new('email', address).can_handle?
end
@@ -38,4 +38,10 @@ describe Gitlab::Email::Handler do
end
end
end
+
+ def ce_handlers
+ @ce_handlers ||= Gitlab::Email::Handler::HANDLERS.reject do |handler|
+ handler.name.start_with?('Gitlab::Email::Handler::EE::')
+ end
+ end
end