Commit 863e1a7a authored by Stan Hu's avatar Stan Hu

Merge branch 'mk/backport-email-handler-spec-fix' into 'master'

[CE Backport] Fix email handler spec for EE

See merge request gitlab-org/gitlab-ce!18298
parents 6b246360 e67759bb
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment